Browse code

dockerbuilder: let the Makefile upload to s3 with 'make release'

Solomon Hykes authored on 2013/05/03 10:11:54
Showing 1 changed files
... ...
@@ -15,12 +15,10 @@ export REVISION=$1
15 15
 
16 16
 if [ -z "$AWS_ID" ]; then
17 17
 	echo "Warning: environment variable AWS_ID is not set. Won't upload to S3."
18
-	NO_S3=1
19 18
 fi
20 19
 
21 20
 if [ -z "$AWS_KEY" ]; then
22 21
 	echo "Warning: environment variable AWS_KEY is not set. Won't upload to S3."
23
-	NO_S3=1
24 22
 fi
25 23
 
26 24
 if [ -z "$GPG_KEY" ]; then
... ...
@@ -28,28 +26,15 @@ if [ -z "$GPG_KEY" ]; then
28 28
 	NO_UBUNTU=1
29 29
 fi
30 30
 
31
-if [ -z "$REVISION" ]; then
32
-	rm -fr docker-master
33
-	git clone https://github.com/dotcloud/docker docker-master
34
-	cd docker-master
35
-else 
36
-	rm -fr docker-$REVISION
37
-	git init docker-$REVISION
38
-	cd docker-$REVISION
39
-	git fetch -t https://github.com/dotcloud/docker $REVISION:$REVISION
40
-	git reset --hard FETCH_HEAD
41
-fi
42
-
31
+rm -fr docker-release
32
+git clone https://github.com/dotcloud/docker docker-release
33
+cd docker-release
43 34
 if [ -z "$REVISION" ]; then
44 35
 	make release
45 36
 else
46 37
 	make release RELEASE_VERSION=$REVISION
47 38
 fi
48 39
 
49
-if [ -z "$NO_S3" ]; then
50
-	s3cmd -P put docker-$REVISION.tgz s3://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-$REVISION.tgz
51
-fi
52
-
53 40
 if [ -z "$NO_UBUNTU" ]; then
54 41
 	(cd packaging/ubuntu && make ubuntu)
55 42
 fi