From a8059059c6d6e83cac23fd84e552d4d98ccf3e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Fri, 16 Aug 2013 15:30:50 -0700 Subject: [PATCH] +CHANGES is now -dirty (works better in URLs), and we have postinstall and prerm jobs. --- make.sh | 18 ++++++++++++++++-- release.sh | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/make.sh b/make.sh index 06bc2f0203..b4af798354 100755 --- a/make.sh +++ b/make.sh @@ -10,7 +10,7 @@ # - The VERSION file, at the root of the repository, should exist, and # will be used as Docker binary version and package version. # - The hash of the git commit will also be included in the Docker binary, -# with the suffix +CHANGES if the repository isn't clean. +# with the suffix -dirty if the repository isn't clean. # - The script is intented to be run as part of a docker build, as defined # in the Dockerfile at the root of the source. In other words: # DO NOT CALL THIS SCRIPT DIRECTLY. @@ -36,7 +36,7 @@ PKGVERSION="$VERSION" GITCOMMIT=$(git rev-parse --short HEAD) if test -n "$(git status --porcelain)" then - GITCOMMIT="$GITCOMMIT+CHANGES" + GITCOMMIT="$GITCOMMIT-dirty" PKGVERSION="$PKGVERSION-$(date +%Y%m%d%H%M%S)-$GITCOMMIT" fi @@ -102,10 +102,24 @@ bundle_ubuntu() { mkdir -p $DIR/usr/bin cp bundles/$VERSION/binary/docker-$VERSION $DIR/usr/bin/docker + # Generate postinstall/prerm scripts + cat >/tmp/postinstall </tmp/prerm < /etc/apt/sources.list.d/docker.l # Then import the repository key curl $(s3_url $BUCKET)/gpg | apt-key add - # Install docker -apt-get update ; apt-get install lxc-docker +apt-get update ; apt-get install -y lxc-docker EOF echo "APT repository uploaded. Instructions available at $(s3_url $BUCKET)/ubuntu/info" }