orchard/resources/version.sh
vapormusic 9aafd737b2 test
2022-05-21 09:48:18 +07:00

8 lines
No EOL
350 B
Bash
Executable file

#!/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