Skip to content

Commit 16f3c8a

Browse files
authored
Remove static file and use goreleaser (#83)
1 parent 18727ff commit 16f3c8a

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- release/v*
1313

1414
env:
15-
GO_VERSION: 1.16.5
15+
GO_VERSION: 1.17.5
1616

1717
jobs:
1818
build:

.goreleaser.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@ builds:
22
- id: importer
33
binary: importer
44
main: ./cmd/importer/main.go
5+
env:
6+
- CGO_ENABLED=0
57
hooks:
6-
pre: ./tools/prep-release.sh
8+
pre: ./tools/prep-release.sh {{ .Tag }}
79
goos:
810
- darwin
911
- linux
1012
- windows
1113
goarch:
1214
- amd64
1315
- arm64
16+
goarm:
17+
- "6"
18+
- "7"
1419

1520
brews:
1621
- name: importer

VERSION.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

tools/prep-release.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@ __root_dir=$(dirname "$0")/..
55
# Fill in revision information
66
git rev-parse --short HEAD >"$__root_dir"/internal/version/REVISION.txt
77

8-
# Copy the version info in the root dir
9-
cp "$__root_dir"/VERSION.txt "$__root_dir"/internal/version/VERSION.txt
8+
# Assuming that tag value is provided as an argument, use that as the version
9+
# information. If missing by any chance, this defaults to "unknown".
10+
__tag=$1
11+
if [[ -z $__tag ]]; then
12+
__tag="unknown"
13+
fi
14+
echo "$__tag" >"$__root_dir"/internal/version/VERSION.txt

0 commit comments

Comments
 (0)