fix
This commit is contained in:
parent
296bb0837d
commit
288cf36648
2 changed files with 5 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
"name": "cider",
|
||||
"applicationId": "Cider",
|
||||
"productName": "Cider",
|
||||
"version": "1.5.4",
|
||||
"version": "1.5.4-beta.84",
|
||||
"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",
|
||||
"main": "./build/index.js",
|
||||
|
|
|
@ -5,12 +5,14 @@ SHA_DATE=$(git show -s --format=%ci $STABLE_SHA)
|
|||
COMMITSINCESTABLE=$(git rev-list $STABLE_SHA..HEAD --count --since="$SHA_DATE")
|
||||
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
|
||||
LATEST_VERSION=$(curl -s https://api.github.com/repos/ciderapp/cider-releases/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//' | xargs)
|
||||
GITHUB_REF_NAME="main"
|
||||
|
||||
# Set the version number for commits on main branch
|
||||
if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_REF_NAME == "main") && $COMMITSINCESTABLE -gt 0 ]]; then
|
||||
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}"
|
||||
|
||||
if [[ $GITHUB_REF_NAME == "main" && $LATEST_VERSION != $NEW_VERSION ]]; then
|
||||
|
||||
# This is shit
|
||||
if [[ $GITHUB_REF_NAME == "main" && $CURRENT_VERSION == $NEW_VERSION ]]; then
|
||||
echo "No version could be made. Picking latest tag."
|
||||
NEW_VERSION="${LATEST_VERSION}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue