fuck semantic versioning
This commit is contained in:
parent
e8968fa463
commit
22635e52bc
2 changed files with 11 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
||||||
"name": "cider",
|
"name": "cider",
|
||||||
"applicationId": "Cider",
|
"applicationId": "Cider",
|
||||||
"productName": "Cider",
|
"productName": "Cider",
|
||||||
"version": "1.5.0",
|
"version": "1.5.0-alpha.13",
|
||||||
"description": "A new cross-platform Apple Music experience based on Electron and Vue.js written from scratch with performance in mind.",
|
"description": "A new cross-platform Apple Music experience based on Electron and Vue.js written from scratch with performance in mind.",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "./build/index.js",
|
"main": "./build/index.js",
|
||||||
|
|
|
@ -3,13 +3,18 @@
|
||||||
LATEST_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs)
|
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)
|
COMMITSINCESTABLE=$(git rev-list $LATEST_SHA..HEAD --count)
|
||||||
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
|
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
|
||||||
|
CIRCLE_BRANCH="main"
|
||||||
|
if [[ $CIRCLE_BRANCH == "main" && $COMMITSINCESTABLE -gt 0 ]]; then
|
||||||
|
NEW_VERSION="${CURRENT_VERSION}-alpha.${COMMITSINCESTABLE}"
|
||||||
|
else
|
||||||
NEW_VERSION=${CURRENT_VERSION/0/$COMMITSINCESTABLE}
|
NEW_VERSION=${CURRENT_VERSION/0/$COMMITSINCESTABLE}
|
||||||
if [[ $COMMITSINCESTABLE -gt 0 ]]
|
fi
|
||||||
then
|
|
||||||
|
if [[ $COMMITSINCESTABLE -gt 0 ]]; then
|
||||||
echo "Version: $NEW_VERSION"
|
echo "Version: $NEW_VERSION"
|
||||||
sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
|
sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
|
||||||
else
|
else
|
||||||
echo "Version unchanged, commits since stable is 0"
|
echo "Version unchanged, commits since stable is ${COMMITSINCESTABLE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV
|
echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue