Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump future from 0.18.2 to 0.18.3 #145

Open
wants to merge 16 commits into
base: nightly
Choose a base branch
from
Prev Previous commit
Next Next commit
Test snapcraft override-pull
  • Loading branch information
JonnyWong16 committed Dec 23, 2022
commit d7f48c8aa17562908408b03dc879921169ebcca0
31 changes: 19 additions & 12 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,34 @@ parts:
override-pull: |
snapcraftctl pull
git config --global --add safe.directory /data/parts/tautulli/src
TAG_FULL="$(git describe --tag)"
TAG="$(echo $TAG_FULL | grep -oP '(v\d+\.\d+\.\d+(?>-beta)?)')"
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
COMMIT="$(git rev-parse HEAD)"
TAG_FULL=$(git describe --tag)
echo $TAG_FULL
TAG=$(echo $TAG_FULL | grep -oP '(v\d+\.\d+\.\d+(?>-beta)?)')
echo $TAG
BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo $BRANCH
COMMIT=$(git rev-parse HEAD)
echo $COMMIT
if [ "$TAG" = "$TAG_FULL" ]; then
VERSION="$TAG"
VERSION=$TAG
else
VERSION="$(echo $COMMIT | head -c 7)"
VERSION=$(echo $COMMIT | head -c 7)
fi
echo $VERSION
if [ ! "$VERSION" = "$TAG" ] || [ ! "$VERSION" = "${VERSION%-beta}" ]; then
GRADE="devel"
GRADE=devel
else
GRADE="stable"
GRADE=stable
fi
echo $GRADE
if [ "$VERSION" = "$TAG" ] && [ ! "$VERSION" = "${VERSION%-beta}" ]; then
BRANCH="beta"
BRANCH=beta
elif [ "$VERSION" = "$TAG" ]; then
BRANCH="master"
BRANCH=master
fi
echo "$BRANCH" > branch.txt
echo "$COMMIT" > version.txt
echo $BRANCH
echo $BRANCH > branch.txt
echo $COMMIT > version.txt
snapcraftctl set-version "$VERSION"
snapcraftctl set-grade "$GRADE"
override-prime: |
Expand Down