From f90d977998c0f2c8aed78b51282f55fc46d8d3e5 Mon Sep 17 00:00:00 2001 From: Philip O'Toole Date: Thu, 21 Oct 2021 08:01:44 -0400 Subject: [PATCH] Small tweaks to packaging --- package.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.sh b/package.sh index 6b4fb49ee..32113364d 100755 --- a/package.sh +++ b/package.sh @@ -10,6 +10,8 @@ # # sudo apt-get -y install musl-dev musl-tools +REPO_URL="https://github.com/rqlite/rqlite" + # copy_binaries copy_binaries () { cp $2/rqlited $1 @@ -24,8 +26,6 @@ upload_asset () { curl -v -H "Content-type: application/octet-stream" -H "Authorization: token $3" -XPOST $upload_url?name=$release_pkg_name --data-binary @$1 } -REPO_URL="https://github.com/rqlite/rqlite" - if [ $# -lt 1 ]; then echo "$0 [release_id api_token]" exit 1 @@ -66,21 +66,21 @@ git clone $REPO_URL cd rqlite go get -d ./... -# Build vanilla release +# Build release for this machine rm -f $GOPATH/bin/* if [ "$kernel" = "Linux" ]; then STATIC="-extldflags=-static" fi CGO_ENABLED=1 go install -a -tags osusergo,netgo,sqlite_omit_load_extension -ldflags="$STATIC $LDFLAGS" ./... if [ "$kernel" = "Linux" ]; then - ldd $GOPATH/bin/rqlited 2>&1 >/dev/null + ldd $GOPATH/bin/rqlited >/dev/null 2>&1 if [ $? -ne 1 ]; then echo "Failed to confirm fully static linking on Linux" exit 1 fi fi -# Package the vanilla release +# Package the release for this machine release=`echo rqlite-$VERSION-$kernel-$machine | tr '[:upper:]' '[:lower:]'` tarball=${release}.tar.gz mkdir $tmp_pkg/$release @@ -93,7 +93,7 @@ if [ -n "$API_TOKEN" ]; then fi if [ "$kernel" != "Linux" ]; then - # We're done + # Only build other versions when on Linux. exit 0 fi