testing mac build with new commit, also testing removing cocoapods from drone
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Dan Ballard 2023-11-14 09:32:55 -08:00
parent 705bffc857
commit cb956d61d0
3 changed files with 28 additions and 18 deletions

View File

@ -300,7 +300,8 @@ steps:
commands:
- mkdir ~/.ssh
- echo $buildbot_key_b64 > ~/.ssh/id_rsa.b64
- base64 -d ~/.ssh/id_rsa.b64 > ~/.ssh/id_rsa
- ls -lh ~/.ssh/id_rsa.b64
- base64 -d -i ~/.ssh/id_rsa.b64 -o ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa
# force by pass of ssh host key check, less secure
- ssh-keyscan -H git.openprivacy.ca >> ~/.ssh/known_hosts
@ -319,20 +320,21 @@ steps:
- ./fetch-tor-macos.sh
- echo `git describe --tags --abbrev=1` > VERSION
- echo `git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M` > COMMIT_DATE
- export PATH=$PATH:/Users/Dan/development/flutter/bin
- export PATH=$PATH:/Users/drone/development/flutter/bin
- flutter pub get
- mkdir deploy
- ./fetch-libcwtch-go-macos.sh
- gem install --user-install cocoapods
# Drone builds in container directories and gem seems to have some weird side effects so have to manually re install these locally
- gem install --user-install ffi -v 1.15.5 -- --enable-libffi-alloc
# currently unneeded to reinstall but was, and may be again? so saving
#- gem install --user-install cocoapods -v 1.11.3
- name: build-macos
commands:
- export PATH=$PATH:/Users/Dan/development/flutter/bin
- export GEM_HOME=$HOME/.gem
- export PATH=$PATH:/Users/drone/bin/flutter/bin
- export PATH=$GEM_HOME/ruby/2.6.0/bin:$PATH
- flutter config --enable-macos-desktop
- flutter build macos --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat COMMIT_DATE`
- export PATH=$PATH:/usr/local/bin #create-dmg
- export PATH=$PATH:/opt/homebrew/bin/ #create-dmg
- macos/package-release.sh
- mkdir -p deploy
- mv Cwtch.dmg deploy/Cwtch-`cat VERSION`.dmg

BIN
macos/dmg/.VolumeIcon.icns Normal file

Binary file not shown.

View File

@ -6,20 +6,28 @@ cp libCwtch.x64.dylib build/macos/Build/Products/Release/Cwtch.app/Contents/Fram
cp libCwtch.arm64.dylib build/macos/Build/Products/Release/Cwtch.app/Contents/Frameworks/
cp -r macos/Tor build/macos/Build/Products/Release/Cwtch.app/Contents/MacOS/
rm Cwtch.dmg
rm -r macos_dmg
mkdir macos_dmg
cp -r "build/macos/Build/Products/Release/Cwtch.app" macos_dmg/
# prep DMG with pregenerated components from GUI supportred run of create-dmg
cp macos/dmg/.* macos_dmg/
ln -s /Applications macos_dmg/Applications
hdiutil create -fs HFS+ -volname Cwtch -srcfolder macos_dmg Cwtch.dmg
# create-dmg requires GUI and is therefore less suited to automated builds, preserving here for
# manual runs to generate new .DS_Store and .VolumeIcon.icns for capture to the dmg dir for automated reuse
# https://github.com/create-dmg/create-dmg
create-dmg \
--volname "Cwtch" \
--volicon "macos/cwtch.icns" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "Cwtch.app" 200 190 \
--hide-extension "Cwtch.app" \
--app-drop-link 600 185 \
"Cwtch.dmg" \
macos_dmg
#create-dmg \
# --volname "Cwtch" \
# --volicon "macos/cwtch.icns" \
# --window-pos 200 120 \
# --window-size 800 400 \
# --icon-size 100 \
# --icon "Cwtch.app" 200 190 \
# --hide-extension "Cwtch.app" \
# --app-drop-link 600 185 \
# "Cwtch.dmg" \
# macos_dmg