fchat-rising/electron/release-scripts/macos.sh

33 lines
866 B
Bash
Raw Normal View History

2023-09-03 20:11:12 +00:00
#!/bin/bash -ex
if [ -z "${1}" ]
then
echo "Usage: ${0} RELEASE_VERSION"
2023-09-03 21:11:24 +00:00
exit 1
2023-09-03 20:11:12 +00:00
fi
RELEASE_VERSION="${1}"
RELEASE_PATH="${HOME}/fchat-rising-dist/${RELEASE_VERSION}"
DIST_PATH="${HOME}/fchat-rising/electron/dist"
2023-09-03 21:10:34 +00:00
cd "${HOME}/fchat-rising"
2023-09-03 20:11:12 +00:00
git checkout master
git pull
yarn
mkdir -p "${RELEASE_PATH}"
rm -rf "${DIST_PATH}"
cd electron
2024-07-07 00:47:24 +00:00
rm -rf app
2023-09-03 20:11:12 +00:00
yarn build:dist
node pack.js
2023-09-03 21:33:27 +00:00
cp "${DIST_PATH}/F-Chat Rising Intel.dmg" "${RELEASE_PATH}/F-Chat-Rising-macos-intel.dmg"
rm -f "${RELEASE_PATH}/F-Chat-Rising-macos-intel.zip"
zip --junk-paths "${RELEASE_PATH}/F-Chat-Rising-macos-intel.zip" "${DIST_PATH}/F-Chat Rising Intel.dmg"
2023-09-03 20:11:12 +00:00
2023-09-03 21:33:27 +00:00
cp "${DIST_PATH}/F-Chat Rising M1.dmg" "${RELEASE_PATH}/F-Chat-Rising-macos-m1.dmg"
rm -f "${RELEASE_PATH}/F-Chat-Rising-macos-m1.zip"
zip --junk-paths "${RELEASE_PATH}/F-Chat-Rising-macos-m1.zip" "${DIST_PATH}/F-Chat Rising M1.dmg"