-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed pre-push git hook in favour of goreleaser
- Loading branch information
1 parent
8606cb5
commit 1b719af
Showing
1 changed file
with
43 additions
and
43 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,43 +1,43 @@ | ||
#!/bin/sh | ||
|
||
R_NAME=$1 | ||
R_URL=$2 | ||
|
||
error_exit() | ||
{ | ||
if [ "$?" != "0" ]; then | ||
nl=$'\n' | ||
echo "$1""$nl""$2""$nl""$nl""Aborting push to ""$R_NAME"" (""$R_URL"")" 1>&2 | ||
exit 1 | ||
fi | ||
} | ||
|
||
# Build binary for variety of arch | ||
# linux amd64 | ||
ERROR=$(go env -w GOOS=linux GOARCH=amd64 2>&1 > /dev/null) | ||
error_exit "Cannot set GOOS=linux and GOARCH=amd64:" "$ERROR" | ||
ERROR=$(go build -o build/logo-ls-linux-amd64 2>&1 > /dev/null) | ||
error_exit "Cannot build logo-ls-linux-amd64:" "$ERROR" | ||
|
||
# linux arm64 | ||
ERROR=$(go env -w GOOS=linux GOARCH=arm64 2>&1 > /dev/null) | ||
error_exit "Cannot set GOOS=linux and GOARCH=arm64:" "$ERROR" | ||
ERROR=$(go build -o build/logo-ls-linux-arm64 2>&1 > /dev/null) | ||
error_exit "Cannot build logo-ls-linux-arm64:" "$ERROR" | ||
|
||
# linux 386 | ||
ERROR=$(go env -w GOOS=linux GOARCH=386 2>&1 > /dev/null) | ||
error_exit "Cannot set GOOS=linux and GOARCH=386:" "$ERROR" | ||
ERROR=$(go build -o build/logo-ls-linux-386 2>&1 > /dev/null) | ||
error_exit "Cannot build logo-ls-linux-386:" "$ERROR" | ||
|
||
# darwin amd64 | ||
ERROR=$(go env -w GOOS=darwin GOARCH=amd64 2>&1 > /dev/null) | ||
error_exit "Cannot set GOOS=darwin and GOARCH=amd64:" "$ERROR" | ||
ERROR=$(go build -o build/logo-ls-darwin-amd64 2>&1 > /dev/null) | ||
error_exit "Cannot build logo-ls-darwin-amd64:" "$ERROR" | ||
|
||
# reset env to default | ||
go env -u GOOS GOARCH | ||
|
||
exit 0 | ||
# #!/bin/sh | ||
|
||
# R_NAME=$1 | ||
# R_URL=$2 | ||
|
||
# error_exit() | ||
# { | ||
# if [ "$?" != "0" ]; then | ||
# nl=$'\n' | ||
# echo "$1""$nl""$2""$nl""$nl""Aborting push to ""$R_NAME"" (""$R_URL"")" 1>&2 | ||
# exit 1 | ||
# fi | ||
# } | ||
|
||
# # Build binary for variety of arch | ||
# # linux amd64 | ||
# ERROR=$(go env -w GOOS=linux GOARCH=amd64 2>&1 > /dev/null) | ||
# error_exit "Cannot set GOOS=linux and GOARCH=amd64:" "$ERROR" | ||
# ERROR=$(go build -o build/logo-ls-linux-amd64 2>&1 > /dev/null) | ||
# error_exit "Cannot build logo-ls-linux-amd64:" "$ERROR" | ||
|
||
# # linux arm64 | ||
# ERROR=$(go env -w GOOS=linux GOARCH=arm64 2>&1 > /dev/null) | ||
# error_exit "Cannot set GOOS=linux and GOARCH=arm64:" "$ERROR" | ||
# ERROR=$(go build -o build/logo-ls-linux-arm64 2>&1 > /dev/null) | ||
# error_exit "Cannot build logo-ls-linux-arm64:" "$ERROR" | ||
|
||
# # linux 386 | ||
# ERROR=$(go env -w GOOS=linux GOARCH=386 2>&1 > /dev/null) | ||
# error_exit "Cannot set GOOS=linux and GOARCH=386:" "$ERROR" | ||
# ERROR=$(go build -o build/logo-ls-linux-386 2>&1 > /dev/null) | ||
# error_exit "Cannot build logo-ls-linux-386:" "$ERROR" | ||
|
||
# # darwin amd64 | ||
# ERROR=$(go env -w GOOS=darwin GOARCH=amd64 2>&1 > /dev/null) | ||
# error_exit "Cannot set GOOS=darwin and GOARCH=amd64:" "$ERROR" | ||
# ERROR=$(go build -o build/logo-ls-darwin-amd64 2>&1 > /dev/null) | ||
# error_exit "Cannot build logo-ls-darwin-amd64:" "$ERROR" | ||
|
||
# # reset env to default | ||
# go env -u GOOS GOARCH | ||
|
||
# exit 0 |