this annoys me

This commit is contained in:
Core 2022-06-03 15:13:52 +01:00
parent 69cc7ee6b2
commit 4844fcc29f
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
2 changed files with 7 additions and 7 deletions

View file

@ -1,8 +1,8 @@
#!/bin/bash
LATESTSHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs)
COMMITSINCESTABLE=$(git rev-list $LATESTSHA..HEAD --count)
VERSION=$(grep '"version":.*' package.json | cut -d '"' -f 4 | head -1)
echo
NEWVERSION=${VERSION/-/.}-$COMMITSINCESTABLE
npm version $NEWVERSION
LATEST_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs)
COMMITSINCESTABLE=$(git rev-list $LATEST_SHA..HEAD --count)
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
NEW_VERSION=${CURRENT_VERSION/-/.}.$COMMITSINCESTABLE
echo "Version: $NEW_VERSION"
sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json