-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from sgsullivan/goreleaser
Goreleaser
- Loading branch information
Showing
5 changed files
with
65 additions
and
0 deletions.
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/_exe | ||
/local | ||
/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,39 @@ | ||
project_name: befehl | ||
before: | ||
hooks: | ||
- go mod verify | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
main: cmd/main/main.go | ||
goos: | ||
- windows | ||
- linux | ||
- darwin | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
amd64: x86_64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
nfpms: | ||
- | ||
replacements: | ||
amd64: x86_64 | ||
license: "Apache 2" | ||
description: "Run arbitrary commands over ssh in mass" | ||
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
formats: | ||
- rpm | ||
- deb | ||
bindir: "/usr/local/bin" |
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 |
---|---|---|
|
@@ -11,3 +11,6 @@ test: | |
|
||
update-deps: | ||
go get -u | ||
|
||
release-build: | ||
scripts/build/release-build |
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,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
unset LDFLAGS | ||
|
||
GITCOMMIT=$(git rev-parse --short HEAD 2> /dev/null) | ||
BUILDTIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
|
||
latest_tag=$(git describe --abbrev=0 --tags) | ||
gitcommit_match_tag=$(git describe --exact-match ${GITCOMMIT} 2> /dev/null) | ||
|
||
if [[ "${gitcommit_match_tag}" == "${latest_tag}" ]]; then | ||
VERSION=${latest_tag} | ||
else | ||
VERSION="${latest_tag}-dirty" | ||
fi | ||
|
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
source scripts/build/.variables | ||
set -e | ||
VERSION=${VERSION} GITCOMMIT=${GITCOMMIT} BUILDTIME=${BUILDTIME} goreleaser --rm-dist | ||
exit 0 |