chore: use git describe --tags for version

This commit is contained in:
AJ ONeal 2023-11-04 23:41:56 -06:00
parent 6f178a6de4
commit ce27e9d610
Signed by: coolaj86
GPG Key ID: F1D692A76F70CF98
3 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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() { (