From d42753485b71f5f26b682a187d1963ef138cd0ab Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 3 Apr 2015 02:07:57 -0600 Subject: [PATCH] Add "bundles/latest" symlink This is a symlink to the latest "bundle" that was assembled. For example, if `VERSION` is currently `1.5.0-dev`, then `bundles/latest` will be a symlink to `bundles/1.5.0-dev` after an attempted build. One interesting property of this is that after a successful `binary` build, we can `./bundles/latest/binary/docker -v` and get back something like `Docker version 1.5.0-dev, build 3ff6723-dirty`. Signed-off-by: Andrew "Tianon" Page --- hack/make.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hack/make.sh b/hack/make.sh index 118d4327f5..8a93176638 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -255,6 +255,12 @@ main() { rm -fr bundles/$VERSION && mkdir bundles/$VERSION || exit 1 echo fi + + if [ "$(go env GOHOSTOS)" != 'windows' ]; then + # Windows and symlinks don't get along well + ln -sfT $VERSION bundles/latest + fi + SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ $# -lt 1 ]; then bundles=(${DEFAULT_BUNDLES[@]})