From 1b719af25beaddd975d61ba638fe3dc3c323f7ef Mon Sep 17 00:00:00 2001 From: Yash-Handa Date: Wed, 9 Sep 2020 01:18:48 +0530 Subject: [PATCH] removed pre-push git hook in favour of goreleaser --- .github/githooks/pre-push | 86 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/githooks/pre-push b/.github/githooks/pre-push index 2a727b7..e56cd33 100755 --- a/.github/githooks/pre-push +++ b/.github/githooks/pre-push @@ -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