Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to create build for Mac; Arm64 #1985

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
"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",
"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:*",
Expand Down
4 changes: 2 additions & 2 deletions packaging/release
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions packaging/update-remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
Expand Down