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>
| ... | ... |
@@ -255,6 +255,12 @@ main() {
|
| 255 | 255 |
rm -fr bundles/$VERSION && mkdir bundles/$VERSION || exit 1 |
| 256 | 256 |
echo |
| 257 | 257 |
fi |
| 258 |
+ |
|
| 259 |
+ if [ "$(go env GOHOSTOS)" != 'windows' ]; then |
|
| 260 |
+ # Windows and symlinks don't get along well |
|
| 261 |
+ ln -sfT $VERSION bundles/latest |
|
| 262 |
+ fi |
|
| 263 |
+ |
|
| 258 | 264 |
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
| 259 | 265 |
if [ $# -lt 1 ]; then |
| 260 | 266 |
bundles=(${DEFAULT_BUNDLES[@]})
|