From bcd14d2423a330e185be16d3b0221444efe8eeb8 Mon Sep 17 00:00:00 2001 From: Andreas Paul Date: Wed, 12 Mar 2025 13:05:52 +0100 Subject: [PATCH] remove github release stuff from build script --- build_release.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/build_release.sh b/build_release.sh index 4c069d0..2c3d1e0 100755 --- a/build_release.sh +++ b/build_release.sh @@ -1,9 +1,9 @@ #! /usr/bin/env bash #set -e -if [ $# -ne 2 ]; then - echo "need the version number and release comment as argument" - echo "e.g. ${0} 0.4.5 'fix local modules and modules with install_path purging bug #80 #82'" +if [ $# -ne 1 ]; then + echo "need the version number as argument to create the git tag" + echo "e.g. ${0} 0.4.5" echo "Aborting..." exit 1 fi @@ -31,9 +31,6 @@ echo "pushing git tag v${1}" git push -f --tags git push -echo "creating github release v${1}" -github-release release --user xorpaul --repo ${projectname} --tag v${1} --name "v${1}" --description "${2}" - export CGO_ENABLED=0 export BUILDTIME=$(date -u '+%Y-%m-%d_%H:%M:%S') export BUILDVERSION=$(git describe --tags) @@ -42,20 +39,17 @@ export BUILDVERSION=$(git describe --tags) echo "building and uploading ${projectname}-darwin-amd64" env GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.buildtime=${BUILDTIME} -X main.buildversion=${BUILDVERSION}" && date -zip ${projectname}-darwin-amd64.zip ${projectname} -github-release upload --user xorpaul --repo ${projectname} --tag v${1} --name "${projectname}-darwin-amd64.zip" --file ${projectname}-darwin-amd64.zip +zip ${projectname}-v${1}-darwin-amd64.zip ${projectname} ### macOS ARM echo "building and uploading ${projectname}-darwin-arm64" env GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.buildtime=${BUILDTIME} -X main.buildversion=${BUILDVERSION}" && date -zip ${projectname}-darwin-arm64.zip ${projectname} -github-release upload --user xorpaul --repo ${projectname} --tag v${1} --name "${projectname}-darwin-arm64.zip" --file ${projectname}-darwin-arm64.zip +zip ${projectname}-v${1}-darwin-arm64.zip ${projectname} ### LINUX echo "building and uploading ${projectname}-linux-amd64" go build -ldflags "-X main.buildtime=${BUILDTIME} -X main.buildversion=${BUILDVERSION}" && date && env ${projectname}_cachedir=/tmp/${projectname} ./${projectname} -config test.yaml -branch benchmark 2>&1 -zip ${projectname}-linux-amd64.zip ${projectname} -github-release upload --user xorpaul --repo ${projectname} --tag v${1} --name "${projectname}-linux-amd64.zip" --file ${projectname}-linux-amd64.zip +zip ${projectname}-v${1}-linux-amd64.zip ${projectname}