From 83c2fa89d753f89069da5f1f133bcc5eb66ce656 Mon Sep 17 00:00:00 2001 From: Gauravjeet Singh Date: Tue, 25 Jun 2024 17:28:48 -0400 Subject: [PATCH 1/2] chore: add the script to create build for mac arm64 --- .travis.yml | 2 +- package.json | 3 ++- packaging/release | 4 ++-- packaging/update-remote.js | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c4c1423cd..b438e9a2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,4 @@ before_install: - ./packaging/add-osx-cert.sh; script: - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then npm test; fi' - - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm test && travis_wait 30 ./packaging/release --branch=$TRAVIS_BRANCH --dist=mac --platform=mac --token=$GH_TOKEN; fi' + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm test && travis_wait 30 ./packaging/release --branch=$TRAVIS_BRANCH --dist=mac --platform=mac --token=$GH_TOKEN && travis_wait 30 ./packaging/release --branch=$TRAVIS_BRANCH --dist=mac --platform=macArm --token=$GH_TOKEN; fi' diff --git a/package.json b/package.json index 6e9eac330..7783572ff 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "start": "npm run build:local && concurrently --kill-others \"npm run watch-css\" \"npm run watch-js\" \"cross-env NODE_ENV=development electron .\"", "build": "npm run build-css & npm run build-js", "build:local": "npm run build-css & npm run build-js:sm", - "pack:mac": "npm run build && electron-builder --mac", + "pack:mac": "npm run build && electron-builder --mac --x64", + "pack:macArm": "npm run build && electron-builder --mac --arm64", "pack:win": "npm run build && electron-builder --win --x64", "pack:win32": "npm run build && electron-builder --win --ia32", "pack:linux": "npm run build && electron-builder --linux --x64", diff --git a/packaging/release b/packaging/release index cb2436b4d..4d3d2ba62 100755 --- a/packaging/release +++ b/packaging/release @@ -19,8 +19,8 @@ const release = async () => { console.log(`Prerelease Track: ${track}`); } - // win-ia32 is run on the same machine right after win-x64, so don't update the version - if (platform !== 'win32') { + // win-ia32 and macArm is run on the same machine right after win-x64, so don't update the version + if (platform !== 'win32' || platform !== 'macArm') { // Get all tags, sort in desc order, and get latest from current track const gitTags = await git().tags(); const gitTag = gitTags.all.reverse().find((tag) => tag.indexOf(track) > -1); diff --git a/packaging/update-remote.js b/packaging/update-remote.js index 779600954..95d420877 100644 --- a/packaging/update-remote.js +++ b/packaging/update-remote.js @@ -6,6 +6,7 @@ const { version } = require('../package.json'); const files = { mac: 'sttm-mac-x64', + macArm: 'sttm-mac-arm64', win: 'sttm-win-x64', win32: 'sttm-win-ia32', }; From eae959c1b0bf02ef80848257a7ffb862530d1db4 Mon Sep 17 00:00:00 2001 From: Gauravjeet Singh Date: Tue, 25 Jun 2024 17:30:30 -0400 Subject: [PATCH 2/2] fix: update dist script in package.json --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7783572ff..1ec24e661 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "pack:win32": "npm run build && electron-builder --win --ia32", "pack:linux": "npm run build && electron-builder --linux --x64", "pack:berry": "export USE_SYSTEM_FPM=true && npm run build && electron-builder --linux --arm64", - "dist:mac": "npm run build && electron-builder --mac --publish always", + "dist:mac": "npm run build && electron-builder --mac --x64 --publish always", + "dist:macArm": "npm run build && electron-builder --mac --arm64 --publish always", "dist:win": "npm run pack:win && electron-builder --win --x64 --publish always", "dist:win32": "npm run pack:win32 && electron-builder --win --ia32 --publish always", "build-css": "run-p build-css:*",