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