[MM-38530] Update build to generate universal binaries (#1747)
* [MM-38530] Update build to generate universal binaries * Rework to only build on releases, not needed for development/PR builds * Update cp_artifacts script * remove pr
This commit is contained in:
parent
e8523067b0
commit
0a19d5815a
|
@ -324,6 +324,10 @@ jobs:
|
|||
os: mac
|
||||
path: ./dist/macos-release
|
||||
subpath: ./macos-release/
|
||||
- build:
|
||||
os: mac-universal
|
||||
path: ./dist/macos-release
|
||||
subpath: ./macos-release/
|
||||
- run:
|
||||
name: Get rename without brew as it might fail
|
||||
command: curl -L https://github.com/ap/rename/archive/v1.601.tar.gz --output rename.tgz
|
||||
|
@ -557,7 +561,6 @@ workflows:
|
|||
branches:
|
||||
only:
|
||||
- /^release-\d+(\.\d+){1,2}(-rc.*)?/
|
||||
- pull/1680
|
||||
|
||||
- store_artifacts:
|
||||
# for master/PR builds
|
||||
|
|
|
@ -44,9 +44,10 @@
|
|||
"test:unit": "npm-run-all test:unit:build test:unit:run",
|
||||
"test:unit:build": "cross-env NODE_ENV=test webpack-cli --bail --config webpack.config.test.js",
|
||||
"test:unit:run": "cross-env NODE_ENV=test mocha --reporter mocha-circleci-reporter dist/tests/test_bundle.js",
|
||||
"package:all": "cross-env NODE_ENV=production npm-run-all check-build-config package:windows package:mac package:linux",
|
||||
"package:all": "cross-env NODE_ENV=production npm-run-all check-build-config package:windows package:mac package:mac-universal package:linux",
|
||||
"package:windows": "cross-env NODE_ENV=production npm-run-all check-build-config build-prod && electron-builder --win --x64 --ia32 --publish=never",
|
||||
"package:mac": "cross-env NODE_ENV=production npm-run-all check-build-config build-prod && electron-builder --mac --x64 --arm64 --publish=never",
|
||||
"package:mac-universal": "cross-env NODE_ENV=production npm-run-all check-build-config build-prod && electron-builder --mac --universal --publish=never",
|
||||
"package:linux": "cross-env NODE_ENV=production npm-run-all check-build-config build-prod && electron-builder --linux --x64 --ia32 --publish=never",
|
||||
"lint:js": "eslint --ignore-path .gitignore --ignore-pattern node_modules --ext .js --ext .jsx --ext .ts --ext .tsx .",
|
||||
"lint:js-quiet": "eslint --ignore-path .gitignore --ignore-pattern node_modules --ext .js --ext .jsx --ext .ts --ext .tsx . --quiet",
|
||||
|
|
|
@ -52,10 +52,19 @@ if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac-arm64.zip" ]]; then
|
|||
fi
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 16))
|
||||
fi
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac-universal.zip" ]]; then
|
||||
echo -e "Copying mac-universal\n"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-universal.zip" "${DEST}/mattermost-desktop-${VERSION}-mac-universal.zip"
|
||||
if [[ -f "${SRC}"/mattermost-desktop-${VERSION}-mac-universal.dmg ]]; then
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-universal.dmg.blockmap" "${DEST}/mattermost-desktop-${VERSION}-mac-universal.dmg.blockmap"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-universal.dmg" "${DEST}/mattermost-desktop-${VERSION}-mac-universal.dmg"
|
||||
fi
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 32))
|
||||
fi
|
||||
if [[ -f "${SRC}"/mattermost-desktop-${VERSION}-linux-x64.tar.gz ]]; then
|
||||
echo -e "Copying linux\n"
|
||||
cp "${SRC}"/mattermost-desktop-*-linux-* "${DEST}/"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 32))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 64))
|
||||
fi
|
||||
|
||||
if [[ $SOMETHING_COPIED -eq 0 ]]; then
|
||||
|
|
Loading…
Reference in a new issue