Here we go again
This commit is contained in:
parent
c501a8ddb1
commit
c07ae6972e
2 changed files with 42 additions and 27 deletions
6
.github/workflows/build-macos.yml
vendored
6
.github/workflows/build-macos.yml
vendored
|
@ -13,7 +13,7 @@ name: "macOS build"
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [ enhancement/macosBuilds ]
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'SECURITY.md'
|
||||
|
@ -24,7 +24,7 @@ on:
|
|||
- cron: '44 20 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
build-macos:
|
||||
name: macOS build
|
||||
runs-on: macos-11
|
||||
permissions:
|
||||
|
@ -99,6 +99,7 @@ jobs:
|
|||
rm -r node_modules/pouchdb-adapter-leveldb/node_modules/leveldown
|
||||
rm -r /node_modules/leveldown/node_modules/node-gyp-build || true
|
||||
yarn dist:universalNotWorking -p never
|
||||
ls
|
||||
# - name: Perform CodeQL Analysis
|
||||
# uses: github/codeql-action/analyze@v1
|
||||
|
||||
|
@ -112,6 +113,7 @@ jobs:
|
|||
p12-file-base64: ${{ secrets.CSC_LINK }}
|
||||
p12-password: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||
|
||||
# Makes the PKG
|
||||
- name: Create PKG manually
|
||||
env:
|
||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||
|
|
|
@ -1,10 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
LATEST_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep '"sha"' | head -1 | cut -d '"' -f 4)
|
||||
SHA_DATE=$(git show -s --format=%ci $LATEST_SHA)
|
||||
COMMITSINCESTABLE=$(git rev-list $LATEST_SHA..HEAD --count --since="$SHA_DATE")
|
||||
printenv
|
||||
# DEBUGGING
|
||||
LATEST_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)
|
||||
echo $LATEST_SHA
|
||||
COMMITSINCESTABLE=$(git rev-list $LATEST_SHA..HEAD --count)
|
||||
echo $COMMITSINCESTABLE
|
||||
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
|
||||
if [[ $CIRCLE_BRANCH == "main" && $COMMITSINCESTABLE -gt 0 ]]; then
|
||||
echo $CURRENT_VERSION
|
||||
GITHUB_BASE_REF="main"
|
||||
echo $GITHUB_BASE_REF
|
||||
|
||||
#############################################################################################
|
||||
|
||||
if [[ ($CIRCLE_BRANCH == "main" || $GITHUB_BASE_REF == "main") && $COMMITSINCESTABLE -gt 0 ]]; then
|
||||
NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}"
|
||||
else
|
||||
NEW_VERSION=${CURRENT_VERSION/0/$COMMITSINCESTABLE}
|
||||
|
@ -17,4 +26,8 @@ else
|
|||
echo "Version unchanged, commits since stable is ${COMMITSINCESTABLE}"
|
||||
fi
|
||||
|
||||
if [[ -z "${GITHUB_ENV}" ]]; then
|
||||
echo "APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$GITHUB_ENV
|
||||
elif [[ -z "${BASH_ENV}" ]]; then
|
||||
echo "export APP_VERSION=$(node -p -e 'require("./package.json").version')" >>$BASH_ENV
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue