This commit is contained in:
Core 2022-08-04 18:09:45 +01:00
parent 983f79ec49
commit f104fc27d9
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
2 changed files with 3 additions and 3 deletions

View file

@ -36,6 +36,8 @@ jobs:
- name: Change Version - name: Change Version
run: sudo chmod +x resources/version.sh && ./resources/version.sh || true run: sudo chmod +x resources/version.sh && ./resources/version.sh || true
env:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Sign in to EVS - name: Sign in to EVS
run: | run: |

View file

@ -1,14 +1,12 @@
#!/bin/bash #!/bin/bash
# Setup the variables needed # Setup the variables needed
STABLE_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep '"sha"' | head -1 | cut -d '"' -f 4) STABLE_SHA=$(curl -H "Authorization: token ${RELEASE_TOKEN}" https://api.github.com/repos/ciderapp/Cider/branches/stable | grep '"sha"' | head -1 | cut -d '"' -f 4)
SHA_DATE=$(git show -s --format=%ci $STABLE_SHA) SHA_DATE=$(git show -s --format=%ci $STABLE_SHA)
COMMIT_SINCE_STABLE=$(git rev-list $STABLE_SHA..HEAD --count --since="$SHA_DATE") COMMIT_SINCE_STABLE=$(git rev-list $STABLE_SHA..HEAD --count --since="$SHA_DATE")
CURRENT_VERSION=$(node -p -e "require('./package.json').version") 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) 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)
curl -H "Authorization: token ${RELEASE_TOKEN}" https://api.github.com/repos/ciderapp/Cider/branches/stable
# Debugging # Debugging
echo "STABLE_SHA: $STABLE_SHA" echo "STABLE_SHA: $STABLE_SHA"
echo "SHA_DATE: $SHA_DATE" echo "SHA_DATE: $SHA_DATE"