Skip to content

Commit

Permalink
Merge pull request #380 from lightninglabs/release_build_amd64_pinning
Browse files Browse the repository at this point in the history
script: pin GOAMD64 for release builds
  • Loading branch information
jharveyb authored Jul 5, 2023
2 parents 257ad39 + 5c1c679 commit af6b8e4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ function check_tag_correct() {

# If the tapd reported version contains a suffix, remove it, so we can match
# the tag properly.
# shellcheck disable=SC2001
tapd_version=$(echo "$tapd_version" | sed -e 's/-\(alpha\|beta\)\(\.rc[0-9]\+\)\?//g')

# Match git tag with tapd version.
Expand All @@ -137,8 +138,8 @@ function build_release() {
reproducible_tar_gzip vendor

maindir=$PACKAGE-$tag
rm -rf $maindir
mkdir -p $maindir
rm -rf "$maindir"
mkdir -p "$maindir"
mv vendor.tar.gz "${maindir}/"

# Don't use tag in source directory, otherwise our file names get too long and
Expand All @@ -158,8 +159,8 @@ function build_release() {
mv "${package_source}.tar.gz" "${package_source}-$tag.tar.gz"

for i in $sys; do
os=$(echo $i | cut -f1 -d-)
arch=$(echo $i | cut -f2 -d-)
os=$(echo "$i" | cut -f1 -d-)
arch=$(echo "$i" | cut -f2 -d-)
arm=

if [[ $arch == "armv6" ]]; then
Expand All @@ -175,8 +176,8 @@ function build_release() {
pushd "${dir}"

green " - Building: ${os} ${arch} ${arm} with build tags '${buildtags}'"
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/tapd
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/tapcli
env CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM=$arm GOAMD64="v1" go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/tapd
env CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" GOARM=$arm GOAMD64="v1" go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/tapcli
popd

# Add the hashes for the individual binaries as well for easy verification
Expand Down

0 comments on commit af6b8e4

Please sign in to comment.