summaryrefslogtreecommitdiffstats
path: root/.ci/macos/deploy.sh
blob: 1dc9472d7bfac5f975388d6611f4a1f525c90ad0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env sh

set -eux

# unused
#TAG=$(git tag -l --points-at HEAD)

# Add Qt binaries to path
PATH=/usr/local/opt/qt/bin/:${PATH}

( 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

  sudo macdeployqt nheko.app -dmg -always-overwrite -qmldir=../resources/qml/

  user=$(id -nu)
  sudo chown "${user}" nheko.dmg
  mv nheko.dmg ..
)

dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg

if [ -n "$VERSION" ]; then
    mv nheko.dmg "nheko-${VERSION}.dmg"
    mkdir artifacts
    cp "nheko-${VERSION}.dmg" artifacts/
fi