From 674830799d157d3bf1a5a0bf720f7fe5bc7864b3 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 2 Mar 2018 22:36:22 +0000 Subject: [PATCH] Add branch name into repo name --- contrib/deb/generate.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/deb/generate.sh b/contrib/deb/generate.sh index 891d3064..e2c98208 100644 --- a/contrib/deb/generate.sh +++ b/contrib/deb/generate.sh @@ -10,15 +10,19 @@ then exit -1 fi -PKGNAME=yggdrasil +PKGBRANCH=$(basename `git name-rev --name-only HEAD`) +if [ "$PKGBRANCH" = "master" ]; then PKGNAME=yggdrasil +else PKGNAME=yggdrasil-${PKGBRANCH}; fi PKGARCH=${PKGARCH-amd64} PKGVERSION=0.$(git rev-list HEAD --count 2>/dev/null | xargs printf "%04d") PKGFILE=$PKGNAME-$PKGVERSION-$PKGARCH.deb if [ $PKGARCH = "amd64" ]; then GOARCH=amd64 GOOS=linux ./build elif [ $PKGARCH = "i386" ]; then GOARCH=386 GOOS=linux ./build +elif [ $PKGARCH = "mipsel" ]; then GOARCH=mipsle GOOS=linux ./build +elif [ $PKGARCH = "mips" ]; then GOARCH=mips64 GOOS=linux ./build else - echo "Specify PKGARCH=amd64 or PKGARCH=i386" + echo "Specify PKGARCH=amd64,i386,mips,mipsel" exit -1 fi