-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add release script * use more portable openssl * add buildid= to ldflags
- Loading branch information
Showing
2 changed files
with
31 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,5 +1,6 @@ | ||
cmd/dcrinstall/dcrinstall | ||
*.sw? | ||
.vscode | ||
release/ | ||
vendor/ | ||
*~ |
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,30 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (c) 2019 The Decred developers | ||
# Use of this source code is governed by the ISC | ||
# license. | ||
|
||
set -ex | ||
|
||
TAG=$1 | ||
REL=(-ldflags "-buildid= -X main.appBuild=release") | ||
|
||
PWD=$(pwd) | ||
PACKAGE=dcrinstall | ||
MAINDIR=$PWD/release/$PACKAGE-$TAG | ||
mkdir -p $MAINDIR | ||
|
||
SYS="darwin-amd64 freebsd-amd64 linux-386 linux-amd64 linux-arm64 openbsd-amd64 windows-386 windows-amd64" | ||
|
||
for i in $SYS; do | ||
OS=$(echo $i | cut -f1 -d-) | ||
ARCH=$(echo $i | cut -f2 -d-) | ||
OUT="$MAINDIR/dcrinstall-$i-$TAG" | ||
if [[ $OS = "windows" ]]; then | ||
OUT="$OUT.exe" | ||
fi | ||
echo "Building:" $OS $ARCH | ||
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH go build -trimpath -tags 'safe,netgo' -o $OUT "${REL[@]}" ./cmd/dcrinstall | ||
done | ||
|
||
(cd $MAINDIR && openssl sha256 -r * > dcrinstall-$TAG-manifest.txt) |