Skip to content

Commit

Permalink
Remove static file and use goreleaser (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
rytswd authored Jan 5, 2022
1 parent 18727ff commit 16f3c8a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- release/v*

env:
GO_VERSION: 1.16.5
GO_VERSION: 1.17.5

jobs:
build:
Expand Down
7 changes: 6 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@ builds:
- id: importer
binary: importer
main: ./cmd/importer/main.go
env:
- CGO_ENABLED=0
hooks:
pre: ./tools/prep-release.sh
pre: ./tools/prep-release.sh {{ .Tag }}
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
goarm:
- "6"
- "7"

brews:
- name: importer
Expand Down
1 change: 0 additions & 1 deletion VERSION.txt

This file was deleted.

9 changes: 7 additions & 2 deletions tools/prep-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ __root_dir=$(dirname "$0")/..
# Fill in revision information
git rev-parse --short HEAD >"$__root_dir"/internal/version/REVISION.txt

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

0 comments on commit 16f3c8a

Please sign in to comment.