this annoys me
This commit is contained in:
parent
69cc7ee6b2
commit
4844fcc29f
2 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue