11 lines
446 B
Bash
Executable File
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
|