2019-04-24 02:55:05 +03:00
|
|
|
#!/usr/bin/env sh
|
2017-11-05 20:14:52 +03:00
|
|
|
|
2019-04-24 02:55:05 +03:00
|
|
|
set -eux
|
2017-11-05 20:14:52 +03:00
|
|
|
|
2019-04-24 02:55:05 +03:00
|
|
|
# unused
|
|
|
|
#TAG=$(git tag -l --points-at HEAD)
|
2017-12-30 19:32:16 +03:00
|
|
|
|
2017-11-05 21:07:14 +03:00
|
|
|
# Add Qt binaries to path
|
2021-08-17 00:11:16 +03:00
|
|
|
PATH=/usr/local/opt/qt@5/bin/:${PATH}
|
2017-11-05 21:07:14 +03:00
|
|
|
|
2019-04-24 02:55:05 +03:00
|
|
|
( cd build
|
|
|
|
# macdeployqt does not copy symlinks over.
|
|
|
|
# this specifically addresses icu4c issues but nothing else.
|
|
|
|
ICU_LIB="$(brew --prefix icu4c)/lib"
|
|
|
|
export ICU_LIB
|
|
|
|
mkdir -p nheko.app/Contents/Frameworks
|
|
|
|
find "${ICU_LIB}" -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true
|
2019-02-05 03:35:03 +03:00
|
|
|
|
2020-12-09 00:32:04 +03:00
|
|
|
macdeployqt nheko.app -dmg -always-overwrite -qmldir=../resources/qml/
|
2019-02-05 03:35:03 +03:00
|
|
|
|
2019-04-24 02:55:05 +03:00
|
|
|
user=$(id -nu)
|
2020-12-09 00:32:04 +03:00
|
|
|
chown "${user}" nheko.dmg
|
2019-04-24 02:55:05 +03:00
|
|
|
mv nheko.dmg ..
|
|
|
|
)
|
2018-04-28 17:28:26 +03:00
|
|
|
|
|
|
|
dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg
|
2018-06-17 16:53:14 +03:00
|
|
|
|
2020-12-09 00:32:04 +03:00
|
|
|
VERSION=${CI_COMMIT_SHORT_SHA}
|
|
|
|
|
2019-08-05 01:47:21 +03:00
|
|
|
if [ -n "$VERSION" ]; then
|
2019-04-24 02:55:05 +03:00
|
|
|
mv nheko.dmg "nheko-${VERSION}.dmg"
|
2019-08-05 01:47:21 +03:00
|
|
|
mkdir artifacts
|
|
|
|
cp "nheko-${VERSION}.dmg" artifacts/
|
2018-06-17 16:53:14 +03:00
|
|
|
fi
|