瀏覽代碼

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 <admwiggin@gmail.com>
Tianon Gravi 10 年之前
父節點
當前提交
d42753485b
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      hack/make.sh

+ 6 - 0
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[@]})