-
Notifications
You must be signed in to change notification settings - Fork 621
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: build next release with goreleaser
- Loading branch information
1 parent
c341f74
commit 5aa9e12
Showing
4 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ fabio | |
fabio.sublime-* | ||
demo/cert/ | ||
pkg/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
builds: | ||
- | ||
binary: release-test | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- darwin | ||
- linux | ||
- freebsd | ||
- netbsd | ||
- openbsd | ||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm | ||
|
||
archive: | ||
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Env.GOVERSION }}-{{ .Os }}_{{ .Arch }}' | ||
format: binary | ||
|
||
checksum: | ||
name_template: '{{.ProjectName}}-{{ .Env.GOVERSION }}-{{.Version}}.sha256' | ||
|
||
sign: | ||
artifacts: checksum | ||
|
||
dockers: | ||
- image: fabiolb/fabio | ||
latest: true | ||
tag_template: '{{ .Version }}-{{ .Env.GOVERSION }}' | ||
- image: magiconair/fabio | ||
latest: true | ||
tag_template: '{{ .Version }}-{{ .Env.GOVERSION }}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash -e | ||
# | ||
# Script for replacing the version number | ||
# in main.go, committing and tagging the code | ||
|
||
readonly prgdir=$(cd $(dirname $0); pwd) | ||
readonly basedir=$(cd $prgdir/..; pwd) | ||
v=$1 | ||
|
||
[[ -n "$v" ]] || read -p "Enter version (e.g. 1.0.4): " v | ||
if [[ -z "$v" ]]; then | ||
echo "Usage: $0 <version> (e.g. 1.0.4)" | ||
exit 1 | ||
fi | ||
|
||
grep -q "$v" CHANGELOG.md || echo "CHANGELOG.md not updated" | ||
|
||
read -p "Tag fabio version $v? (y/N) " -n 1 -r | ||
echo | ||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then | ||
exit 1 | ||
fi | ||
|
||
sed -i '' -e "s|^var version .*$|var version = \"$v\"|" $basedir/main.go | ||
git add $basedir/main.go | ||
git commit -S -m "Release v$v" | ||
git tag -s v$v -m "Tag v${v}" |