Packaging|ubuntu, issue #960: Add docker PPA staging in release process
Daniel Mizyrycki authored on 2013/06/21 01:03:15... | ... |
@@ -2,11 +2,11 @@ |
2 | 2 |
# |
3 | 3 |
# Dependencies: debhelper autotools-dev devscripts golang-stable |
4 | 4 |
# Notes: |
5 |
-# Use 'make ubuntu' to create the ubuntu package |
|
6 |
-# GPG_KEY environment variable needs to contain a GPG private key for package to be signed |
|
7 |
-# and uploaded to docker PPA. |
|
8 |
-# If GPG_KEY is not defined, make ubuntu will create docker package and exit with |
|
9 |
-# status code 2 |
|
5 |
+# Use 'make ubuntu' to create the ubuntu package and push it to stating PPA by |
|
6 |
+# default. To push to production, set PUBLISH_PPA=1 before doing 'make ubuntu' |
|
7 |
+# GPG_KEY environment variable needs to contain a GPG private key for package |
|
8 |
+# to be signed and uploaded to docker PPA. If GPG_KEY is not defined, |
|
9 |
+# make ubuntu will create docker package and exit with status code 2 |
|
10 | 10 |
|
11 | 11 |
PKG_NAME=lxc-docker |
12 | 12 |
GITHUB_PATH=github.com/dotcloud/docker |
... | ... |
@@ -52,9 +52,11 @@ ubuntu: |
52 | 52 |
if /usr/bin/test "$${GPG_KEY}" == ""; then exit 2; fi |
53 | 53 |
mkdir ${BUILD_SRC} |
54 | 54 |
# Import gpg signing key |
55 |
- echo "$${GPG_KEY}" | gpg --allow-secret-key-import --import |
|
55 |
+ echo "$${GPG_KEY}" | gpg --allow-secret-key-import --import || true |
|
56 | 56 |
# Sign the package |
57 | 57 |
cd ${BUILD_SRC}; dpkg-source -x ${BUILD_SRC}/../${PKG_NAME}_${VERSION}-1.dsc |
58 | 58 |
cd ${BUILD_SRC}/${PKG_NAME}-${VERSION}; debuild -S -sa |
59 |
- cd ${BUILD_SRC};dput ppa:dotcloud/lxc-docker ${PKG_NAME}_${VERSION}-1_source.changes |
|
59 |
+ # Upload to PPA |
|
60 |
+ if [ "${PUBLISH_PPA}" = "1" ]; then cd ${BUILD_SRC};dput ppa:dotcloud/lxc-docker ${PKG_NAME}_${VERSION}-1_source.changes; fi |
|
61 |
+ if [ "${PUBLISH_PPA}" != "1" ]; then cd ${BUILD_SRC};dput ppa:dotcloud/docker-staging ${PKG_NAME}_${VERSION}-1_source.changes; fi |
|
60 | 62 |
rm -rf ${BUILD_SRC} |