mirror of https://github.com/Nheko-Reborn/nheko
parent
33b1f37e37
commit
eee6f2de31
@ -1,14 +1,15 @@ |
|||||||
#!/usr/bin/env bash |
#!/usr/bin/env sh |
||||||
|
|
||||||
# Runs the Clang Formatter |
# Runs the Clang Formatter |
||||||
# Return codes: |
# Return codes: |
||||||
# - 1 there are files to be formatted |
# - 1 there are files to be formatted |
||||||
# - 0 everything looks fine |
# - 0 everything looks fine |
||||||
|
|
||||||
set -o errexit |
set -eu |
||||||
set -o pipefail |
|
||||||
set -o nounset |
|
||||||
|
|
||||||
FILES=`find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \)` |
FILES=$(find src -type f -type f \( -iname "*.cpp" -o -iname "*.h" \)) |
||||||
|
|
||||||
clang-format -i $FILES && git diff --exit-code |
for f in $FILES |
||||||
|
do |
||||||
|
clang-format -i "$f" && git diff --exit-code |
||||||
|
done; |
||||||
|
@ -1,29 +1,30 @@ |
|||||||
#!/usr/bin/env bash |
#!/usr/bin/env sh |
||||||
|
|
||||||
set -ex |
set -eux |
||||||
|
|
||||||
TAG=`git tag -l --points-at HEAD` |
# unused |
||||||
|
#TAG=$(git tag -l --points-at HEAD) |
||||||
|
|
||||||
# Add Qt binaries to path |
# Add Qt binaries to path |
||||||
PATH=/usr/local/opt/qt/bin/:${PATH} |
PATH=/usr/local/opt/qt/bin/:${PATH} |
||||||
|
|
||||||
pushd build |
( 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 |
||||||
|
|
||||||
# macdeployqt does not copy symlinks over. |
sudo macdeployqt nheko.app -dmg -always-overwrite |
||||||
# this specifically addresses icu4c issues but nothing else. |
|
||||||
export ICU_LIB="$(brew --prefix icu4c)/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 |
user=$(id -nu) |
||||||
|
sudo chown "${user}" nheko.dmg |
||||||
user=$(id -nu) |
mv nheko.dmg .. |
||||||
sudo chown ${user} nheko.dmg |
) |
||||||
mv nheko.dmg .. |
|
||||||
popd |
|
||||||
|
|
||||||
dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg |
dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg |
||||||
|
|
||||||
if [ ! -z $VERSION ]; then |
if [ ! -z "$VERSION" ]; then |
||||||
mv nheko.dmg nheko-${VERSION}.dmg |
mv nheko.dmg "nheko-${VERSION}.dmg" |
||||||
fi |
fi |
||||||
|
Loading…
Reference in new issue