From d315941f210e6379eb377318224c1e3fc9614123 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 10 Jan 2023 14:23:59 -0700 Subject: [PATCH] Version command implemented --- app/data/version.txt | 2 +- scripts/build_shiv_package.sh | 4 ++-- scripts/update_version_file.sh | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/data/version.txt b/app/data/version.txt index 81447904..0ee3baa4 100644 --- a/app/data/version.txt +++ b/app/data/version.txt @@ -1,2 +1,2 @@ # This file should be re-generated running: scripts/update-version-file.sh script -v1.0.6-alpha 9278d09 +v1.0.6-alpha-ae7a17c diff --git a/scripts/build_shiv_package.sh b/scripts/build_shiv_package.sh index 98f49f4f..2fbd68ad 100755 --- a/scripts/build_shiv_package.sh +++ b/scripts/build_shiv_package.sh @@ -1,3 +1,3 @@ # Builds the shiv "package" for distribution -./scripts/update_version_file.sh -shiv -c laconic-so -o package/laconic-so . +version_string=$( ./scripts/update_version_file.sh) +shiv -c laconic-so -o package/laconic-so-${version_string} . diff --git a/scripts/update_version_file.sh b/scripts/update_version_file.sh index fdcdac32..9880b21b 100755 --- a/scripts/update_version_file.sh +++ b/scripts/update_version_file.sh @@ -1,3 +1,7 @@ version_file_name=./app/data/version.txt echo "# This file should be re-generated running: scripts/update-version-file.sh script" > $version_file_name -echo $( git describe --tags --abbrev=0 ; git rev-parse --short HEAD ) >> $version_file_name +tag_string=$( git describe --tags --abbrev=0 ) +commit_string=$( git rev-parse --short HEAD ) +version_string=${tag_string}-${commit_string} +echo ${version_string} >> $version_file_name +echo ${version_string}