New build version scheme #305
@ -23,7 +23,7 @@ def command(ctx):
|
||||
|
||||
# See: https://stackoverflow.com/a/20885799/1701505
|
||||
from . import data
|
||||
with importlib.resources.open_text(data, "version.txt") as version_file:
|
||||
with importlib.resources.open_text(data, "build_tag.txt") as version_file:
|
||||
# TODO: code better version that skips comment lines
|
||||
version_string = version_file.read().splitlines()[1]
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
version_file_name=./app/data/version.txt
|
||||
echo "# This file should be re-generated running: scripts/update-version-file.sh script" > $version_file_name
|
||||
tag_string=$( git describe --tags --abbrev=0 )
|
||||
build_tag_file_name=./app/data/build_tag.txt
|
||||
echo "# This file should be re-generated running: scripts/create_build_tag_file.sh script" > $build_tag_file_name
|
||||
product_version_string=$( tail -1 ./app/data/version.txt )
|
||||
commit_string=$( git rev-parse --short HEAD )
|
||||
version_string=${tag_string}-${commit_string}
|
||||
echo ${version_string} >> $version_file_name
|
||||
echo ${version_string}
|
||||
timestamp_string=$(date +'%Y%m%d%H%M')
|
||||
build_tag_string=${product_version_string}-${commit_string}-${timestamp_string}
|
||||
echo ${build_tag_string} >> $build_tag_file_name
|
||||
echo ${build_tag_string}
|
||||
|
Loading…
Reference in New Issue
Block a user