mirror of
https://github.com/frappe/books.git
synced 2024-09-20 03:29:00 +00:00
chore: add script to build arm64 locally and publish
This commit is contained in:
parent
64b456798f
commit
4d8f17c3bb
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,6 +5,7 @@ node_modules
|
|||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env
|
.env
|
||||||
|
.env.publish
|
||||||
.env.local
|
.env.local
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
|
||||||
@ -24,4 +25,5 @@ yarn-error.log*
|
|||||||
|
|
||||||
#Electron-builder output
|
#Electron-builder output
|
||||||
/dist_electron
|
/dist_electron
|
||||||
|
/build_publish
|
||||||
log_creds.txt
|
log_creds.txt
|
@ -11,6 +11,7 @@
|
|||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"lint": "vue-cli-service lint",
|
"lint": "vue-cli-service lint",
|
||||||
|
"release": "scripts/publish-mac-arm.sh",
|
||||||
"postinstall": "electron-rebuild",
|
"postinstall": "electron-rebuild",
|
||||||
"postuninstall": "electron-rebuild",
|
"postuninstall": "electron-rebuild",
|
||||||
"electron:build": "vue-cli-service electron:build",
|
"electron:build": "vue-cli-service electron:build",
|
||||||
|
42
scripts/publish-mac-arm.sh
Executable file
42
scripts/publish-mac-arm.sh
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
# #! /bin/zsh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Check node and yarn versions
|
||||||
|
NODE_VERSION=$(node --version)
|
||||||
|
YARN_VERSION=$(yarn --version)
|
||||||
|
if [ "$YARN_VERSION" != "1.22.18" ]; then
|
||||||
|
echo "Incorrect yarn version: $YARN_VERSION"
|
||||||
|
exit 1
|
||||||
|
elif [ "$NODE_VERSION" != "v16.13.1" ]; then
|
||||||
|
echo "Incorrect node version: $NODE_VERSION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Source secrets
|
||||||
|
source .env.publish
|
||||||
|
|
||||||
|
# Create folder for the publish build
|
||||||
|
rm -rf build_publish
|
||||||
|
mkdir build_publish
|
||||||
|
cd build_publish
|
||||||
|
|
||||||
|
# Clone and cd into books
|
||||||
|
git clone https://github.com/frappe/books --depth 1
|
||||||
|
cd books
|
||||||
|
|
||||||
|
# Copy creds to log_creds.txt
|
||||||
|
echo $ERR_LOG_KEY > log_creds.txt
|
||||||
|
echo $ERR_LOG_SECRET >> log_creds.txt
|
||||||
|
echo $ERR_LOG_URL >> log_creds.txt
|
||||||
|
echo $TELEMETRY_URL >> log_creds.txt
|
||||||
|
|
||||||
|
# Enable Code Signing
|
||||||
|
CSC_IDENTITY_AUTO_DISCOVERY=true
|
||||||
|
|
||||||
|
# Build
|
||||||
|
yarn install
|
||||||
|
export GH_TOKEN=$GH_PUBLISH_TOKEN &&
|
||||||
|
yarn electron:build --mac --publish=always
|
||||||
|
|
||||||
|
cd ../../
|
Loading…
Reference in New Issue
Block a user