Implement versioned builds
- Introduce new build arg `VERSION_TAG` - Update version freshness checking - Rename docker-compose build example filepull/24/head
parent
79c7cf645e
commit
f85bf702ea
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# Get current directory
|
||||
cur_dir=$(pwd)
|
||||
src_dir="/src"
|
||||
|
||||
# Go to source code
|
||||
cd $src_dir
|
||||
|
||||
# If the version number is not an empty string
|
||||
if [ -n "$VERSION_TAG" ]; then
|
||||
# If NOT the tag is "nightly"...
|
||||
if [ "$VERSION_TAG" != "nightly" ]; then
|
||||
# Use the version number as a tag to checkout
|
||||
git checkout -b $VERSION_TAG $VERSION_TAG
|
||||
fi
|
||||
fi
|
||||
|
||||
# Go back to the original directory
|
||||
cd $cur_dir
|
Loading…
Reference in New Issue