Skip to content

Commit

Permalink
Merge pull request #2504 from Roasbeef/vendor-with-release
Browse files Browse the repository at this point in the history
build: update release.sh to contain vendor archive + source code
  • Loading branch information
Roasbeef authored Jan 19, 2019
2 parents 9c344ec + df45cc1 commit 4537c63
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@ else
TAG=$1
fi

go mod vendor
tar -cvzf vendor.tar.gz vendor

PACKAGE=lnd
MAINDIR=$PACKAGE-$TAG
mkdir -p $MAINDIR

cp vendor.tar.gz $MAINDIR/
rm vendor.tar.gz
rm -r vendor

PACKAGESRC="$MAINDIR/$PACKAGE-source-$TAG.tar"
git archive -o $PACKAGESRC HEAD
gzip -f $PACKAGESRC > "$PACKAGESRC.gz"

cd $MAINDIR

# If LNDBUILDSYS is set the default list is ignored. Useful to release
Expand All @@ -35,24 +47,29 @@ for i in $SYS; do
OS=$(echo $i | cut -f1 -d-)
ARCH=$(echo $i | cut -f2 -d-)
ARM=

if [[ $ARCH = "armv6" ]]; then
ARCH=arm
ARM=6
elif [[ $ARCH = "armv7" ]]; then
ARCH=arm
ARM=7
fi

mkdir $PACKAGE-$i-$TAG
cd $PACKAGE-$i-$TAG

echo "Building:" $OS $ARCH $ARM
env GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -ldflags "$COMMITFLAGS" github.com/lightningnetwork/lnd
env GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -ldflags "$COMMITFLAGS" github.com/lightningnetwork/lnd/cmd/lncli
cd ..

if [[ $OS = "windows" ]]; then
zip -r $PACKAGE-$i-$TAG.zip $PACKAGE-$i-$TAG
else
tar -cvzf $PACKAGE-$i-$TAG.tar.gz $PACKAGE-$i-$TAG
fi

rm -r $PACKAGE-$i-$TAG
done

Expand Down

0 comments on commit 4537c63

Please sign in to comment.