Skip to content

Commit

Permalink
remove legacy cleanup / use quotes in ldflags for all
Browse files Browse the repository at this point in the history
  • Loading branch information
naggie committed Sep 29, 2019
1 parent b8efdc0 commit 2518e81
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions do-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ BUILD_DATE=$(date)
RELEASE_FILE=RELEASE.md

LDFLAGS="-s -w \
-X github.com/naggie/dstask.GIT_COMMIT=$GIT_COMMIT \
-X github.com/naggie/dstask.VERSION=$VERSION \
-X \"github.com/naggie/dstask.GIT_COMMIT=$GIT_COMMIT\" \
-X \"github.com/naggie/dstask.VERSION=$VERSION\" \
-X \"github.com/naggie/dstask.BUILD_DATE=$BUILD_DATE\"\
"

# get release information

if ! test -f $RELEASE_FILE || head -n 1 $RELEASE_FILE | grep -vq $VERSION; then
# file doesn't exist or is for old version, replace
printf "$VERSION\n\n\n" > $RELEASE_FILE
Expand All @@ -30,7 +29,6 @@ vim "+ normal G $" $RELEASE_FILE


# build

mkdir -p dist

GOOS=linux GOARCH=arm GOARM=5 go build -mod=vendor -ldflags="$LDFLAGS" cmd/dstask.go
Expand All @@ -52,5 +50,3 @@ hub release create \
-a dist/dstask-darwin-amd64#"dstask darwin-amd64" \
-F $RELEASE_FILE \
$1

rm -rf dist/tmp

0 comments on commit 2518e81

Please sign in to comment.