From ce27e9d610e719a845208089876d6cd0b15f872c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 4 Nov 2023 23:41:56 -0600 Subject: [PATCH] chore: use git describe --tags for version --- tinygo-build-linux.sh | 6 ++++-- tinygo-build-macos.sh | 7 ++++--- tinygo-build-windows.sh | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tinygo-build-linux.sh b/tinygo-build-linux.sh index 0cd42ab..06cebe2 100644 --- a/tinygo-build-linux.sh +++ b/tinygo-build-linux.sh @@ -6,7 +6,9 @@ set -u # building for linux on linux seems to yield smaller sizes # TODO use the git log describe thing -my_version="0.6.0" +my_version="$( + git describe --tags +)" export GOOS="linux" fn_package() { ( @@ -18,7 +20,7 @@ fn_package() { ( my_arch="${GOARCH}" fi - my_bin="pathman-v${my_version}-${GOOS}-${my_arch}" + my_bin="pathman-${my_version}-${GOOS}-${my_arch}" tinygo build -no-debug -o "${my_bin}" strip "${my_bin}" || true diff --git a/tinygo-build-macos.sh b/tinygo-build-macos.sh index e6fad91..9886faa 100644 --- a/tinygo-build-macos.sh +++ b/tinygo-build-macos.sh @@ -5,8 +5,9 @@ set -u # NOTE # building for macOS on macOS seems to yield smaller sizes -# TODO use the git log describe thing -my_version="0.6.0" +my_version="$( + git describe --tags +)" export GOOS="darwin" fn_package() { ( @@ -18,7 +19,7 @@ fn_package() { ( my_arch="${GOARCH}" fi - my_bin="pathman-v${my_version}-${GOOS}-${my_arch}" + my_bin="pathman-${my_version}-${GOOS}-${my_arch}" tinygo build -no-debug -o "${my_bin}" strip "${my_bin}" || true diff --git a/tinygo-build-windows.sh b/tinygo-build-windows.sh index 19b3428..810f79c 100644 --- a/tinygo-build-windows.sh +++ b/tinygo-build-windows.sh @@ -6,7 +6,9 @@ set -u # building for macOS on macOS seems to yield smaller sizes # TODO use the git log describe thing -my_version="0.6.0" +my_version="$( + git describe --tags +)" export GOOS="windows" fn_package() { (