2018-09-03 01:57:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
|
|
|
|
chmod 700 ~/.ssh
|
|
|
|
|
|
|
|
echo "Decrypting SSH key..."
|
|
|
|
|
|
|
|
openssl aes-256-cbc -K $encrypted_e9bb4da59666_key -iv $encrypted_e9bb4da59666_iv -in travis-deploy-key.enc -out ~/.ssh/id_rsa -d
|
|
|
|
|
|
|
|
chmod 600 ~/.ssh/id_rsa
|
|
|
|
|
2018-09-03 23:50:04 +00:00
|
|
|
mkdir ~/dist
|
|
|
|
cd ~/dist
|
|
|
|
|
|
|
|
echo "Copying binary into dist folder..."
|
|
|
|
|
2019-02-06 04:47:17 +00:00
|
|
|
cp -rv ${TRAVIS_BUILD_DIR}/pkg/apple/build/Release/RetroArch.app .
|
2018-09-03 23:50:04 +00:00
|
|
|
|
|
|
|
echo "Downloading assets..."
|
|
|
|
|
|
|
|
cd RetroArch.app/Contents/Resources/
|
|
|
|
curl -O http://bot.libretro.com/assets/frontend/bundle.zip
|
2018-09-04 00:00:03 +00:00
|
|
|
unzip -q -o bundle.zip
|
2018-09-03 23:50:04 +00:00
|
|
|
rm -rf bundle.zip
|
|
|
|
|
2018-09-03 01:57:06 +00:00
|
|
|
echo "Creating DMG image..."
|
|
|
|
|
2018-09-03 23:50:04 +00:00
|
|
|
cd ~/dist
|
2018-09-03 01:57:06 +00:00
|
|
|
|
|
|
|
FILENAME=$(date +%F)_RetroArch_Metal.dmg
|
|
|
|
|
2018-09-03 23:50:04 +00:00
|
|
|
hdiutil create -volname RetroArch -srcfolder ./ -ov -format UDZO ~/${FILENAME}
|
2019-08-27 14:31:23 +00:00
|
|
|
cp -f ~/${FILENAME} ~/RetroArch_Metal.dmg
|
2018-09-03 01:57:06 +00:00
|
|
|
|
2019-11-05 14:44:47 +00:00
|
|
|
echo "Notarizing DMG..."
|
|
|
|
|
|
|
|
codesign --force --verbose --timestamp --sign "7069CC8A4AE9AFF0493CC539BBA4FA345F0A668B" ~/RetroArch_Metal.dmg
|
2021-05-29 04:03:35 +00:00
|
|
|
REQUESTUUID=$(xcrun altool --notarize-app -t osx -f ~/RetroArch_Metal.dmg --primary-bundle-id com.libretro.RetroArchM -u $APPLE_ID -p $APPLE_ID_PASS -itc_provider UK699V5ZS8 | awk '/RequestUUID/ { print $NF; }')
|
2019-11-21 04:12:54 +00:00
|
|
|
sleep 200
|
2021-03-07 22:23:53 +00:00
|
|
|
xcrun altool --notarization-info $REQUESTUUID -u $APPLE_ID -p $APPLE_ID_PASS -ascprovider UK699V5ZS8
|
2019-11-05 14:44:47 +00:00
|
|
|
xcrun stapler staple ~/RetroArch_Metal.dmg
|
|
|
|
xcrun stapler validate ~/RetroArch_Metal.dmg
|
|
|
|
|
2018-09-03 01:57:06 +00:00
|
|
|
echo "Uploading to server..."
|
|
|
|
|
2018-09-03 23:50:04 +00:00
|
|
|
rsync -avhP -e 'ssh -p 12346 -o StrictHostKeyChecking=no' ~/${FILENAME} travis@bot.libretro.com:~/nightly/apple/osx/x86_64/
|
2019-08-27 14:31:23 +00:00
|
|
|
rsync -avhP -e 'ssh -p 12346 -o StrictHostKeyChecking=no' ~/RetroArch_Metal.dmg travis@bot.libretro.com:~/nightly/apple/osx/x86_64/
|
|
|
|
|
|
|
|
rm -f ~/RetroArch_Metal.dmg
|