Files
CommandTabFree/scripts/update_appcast.sh
T
louis.pontoise 80f378b117 ci: big refac to finally rationalize the xcode mess
XCode project/workspace/configurations/target/pods have been in a mess for a while. Some changes done to address that:

* remove alt-tab-macos/ which was confusing
* ci/ becomes scripts/ as these can be used locally too
* added 3 xcconfig files to set aside important parameters so we stop passing flags around or modifying the huge pbxproj
2020-03-10 14:00:37 +09:00

31 lines
1007 B
Bash
Executable File

#!/usr/bin/env bash
set -exu
version="$(cat $VERSION_FILE)"
changelogDelta="$(npx marked < $CHANGELOG_DELTA_FILE)"
date="$(date +'%a, %d %b %Y %H:%M:%S %z')"
minimumSystemVersion="$(awk -F ' = ' '/MACOSX_DEPLOYMENT_TARGET/ { print $2; }' < config/base.xcconfig)"
zipName="$APP_NAME-$version.zip"
edSignatureAndLength=$(Pods/Sparkle/bin/sign_update -s $SPARKLE_ED_PRIVATE_KEY "$XCODE_BUILD_PATH/$zipName")
echo "
<item>
<title>Version $version</title>
<pubDate>$date</pubDate>
<sparkle:minimumSystemVersion>$minimumSystemVersion</sparkle:minimumSystemVersion>
<description><![CDATA[
$changelogDelta
]]>
</description>
<enclosure
url=\"https://github.com/lwouis/alt-tab-macos/releases/download/v$version/$zipName\"
sparkle:version=\"$version\"
sparkle:shortVersionString=\"$version\"
$edSignatureAndLength
type=\"application/octet-stream\"/>
</item>
" > ITEM.txt
sed -i '' -e "/<\/language>/r ITEM.txt" appcast.xml