Removed the checkout shit
This commit is contained in:
parent
6e6de42f3f
commit
d7bd15cf6b
2 changed files with 4 additions and 15 deletions
6
.github/workflows/build-macos.yml
vendored
6
.github/workflows/build-macos.yml
vendored
|
@ -45,12 +45,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
xcode-version: '12.4'
|
xcode-version: '12.4'
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: ${{ github.sha }}
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- 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
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# DEBUGGING
|
STABLE_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep '"sha"' | head -1 | cut -d '"' -f 4)
|
||||||
STABLE_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs | cut -d' ' -f1 | head -n 1)
|
SHA_DATE=$(git show -s --format=%ci $STABLE_SHA)
|
||||||
COMMITSINCESTABLE=$(git rev-list $STABLE_SHA..$GITHUB_SHA --count)
|
COMMITSINCESTABLE=$(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")
|
||||||
|
|
||||||
git rev-list --all
|
|
||||||
|
|
||||||
#############################################################################################
|
|
||||||
|
|
||||||
if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_REF_NAME == "main") && $COMMITSINCESTABLE -gt 0 ]]; then
|
if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_REF_NAME == "main") && $COMMITSINCESTABLE -gt 0 ]]; then
|
||||||
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}"
|
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}"
|
||||||
else
|
else
|
||||||
|
@ -26,4 +21,4 @@ if [[ -z "${GITHUB_ENV}" ]]; then
|
||||||
echo "APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$GITHUB_ENV
|
echo "APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$GITHUB_ENV
|
||||||
elif [[ -z "${BASH_ENV}" ]]; then
|
elif [[ -z "${BASH_ENV}" ]]; then
|
||||||
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
|
||||||
fi
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue