aboutsummaryrefslogtreecommitdiffstats
path: root/bin/build
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-01-05 09:53:45 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-01-05 10:56:30 -0600
commita4f1bdb040a5bc7f1e1faf69bb604f8ab7b35e04 (patch)
treeb36a362666d56f014c8f57cf945b47fad95f2109 /bin/build
parent77c570f4210d5f637409c500216829c23728e04f (diff)
downloadslskd-a4f1bdb040a5bc7f1e1faf69bb604f8ab7b35e04.tar.gz
default version to current tag and short git sha
Diffstat (limited to 'bin/build')
-rwxr-xr-xbin/build12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/build b/bin/build
index 23b09171..7c76b824 100755
--- a/bin/build
+++ b/bin/build
@@ -4,7 +4,9 @@ set -e
web_only=false
dotnet_only=false
skip_tests=false
-version_suffix=$(git rev-parse --short HEAD)
+tag=$(git describe --tags)
+sha=$(git rev-parse --short HEAD)
+version=$tag-$sha
while test $# -gt 0; do
case "$1" in
@@ -29,9 +31,9 @@ while test $# -gt 0; do
skip_tests=true
shift
;;
- --version-suffix)
+ --version)
shift
- version_suffix=$1
+ version=$1
shift
;;
*)
@@ -83,8 +85,8 @@ else
echo $'\n> pwd\n'
pwd
- echo $'\n> dotnet build --no-incremental --nologo --configuration Release\n'
- dotnet build --no-incremental --nologo --configuration Release --version-suffix $version_suffix
+ echo $'\n> dotnet build --no-incremental --nologo --configuration Release -p:Version '$version$'\n'
+ dotnet build --no-incremental --nologo --configuration Release -p:Version=$version
if [ "$skip_tests" == true ]; then
echo $'\ndotnet tests skipped\n'