Files
gas-stack/ops/compile.sh
~wispem-wantex 171da4139b
Some checks failed
CI / build-docker (push) Successful in 4s
CI / build-docker-bootstrap (push) Has been skipped
CI / release-test (push) Failing after 13s
cmd: add a 'version' subcommand and flag to show the version
2026-09-21 17:28:59 -07:00

11 lines
446 B
Bash
Executable File

#!/bin/sh
# Stamp the version into the binary. `git describe` fails when this isn't a git checkout (e.g. a
# source export with no .git dir); in that case leave it empty, and pkg/version falls back to the
# build info that the Go toolchain embeds.
VERSION=$(git describe --tags --always --dirty 2>/dev/null)
go build -tags fts5 \
-ldflags "-X git.offline-twitter.com/offline-labs/gas-stack/pkg/version.Version=$VERSION" \
-o gas ./cmd