Tag v0.1.0
This commit is contained in:
+1
-48
@@ -4,9 +4,6 @@ mac=$(cd "$(dirname "$0")" && pwd)
|
||||
root=$(dirname "$mac")
|
||||
repo=ai/byre
|
||||
api=https://g.fc.run/api/v1/repos/$repo
|
||||
sparkle_version=2.10.0
|
||||
sparkle=$HOME/Library/Caches/byre/sparkle-$sparkle_version
|
||||
identity="Developer ID Application"
|
||||
|
||||
if [ -n "$(git -C "$root" status --porcelain)" ]; then
|
||||
echo "release: the tree has uncommitted changes" >&2
|
||||
@@ -21,53 +18,9 @@ if [ "$(git -C "$root" rev-parse "FETCH_HEAD^{commit}")" != "$(git -C "$root" re
|
||||
fi
|
||||
token=$(security find-generic-password -s byre-release -w)
|
||||
|
||||
if [ ! -x "$sparkle/bin/sign_update" ]; then
|
||||
mkdir -p "$sparkle"
|
||||
curl -fsSL "https://github.com/sparkle-project/Sparkle/releases/download/$sparkle_version/Sparkle-$sparkle_version.tar.xz" | tar -xJ -C "$sparkle"
|
||||
fi
|
||||
|
||||
"$mac/bundle.sh"
|
||||
app=$mac/.build/Byre.app
|
||||
"$mac/package.sh"
|
||||
out=$mac/.build/release/$version
|
||||
rm -rf "$out"
|
||||
mkdir -p "$out"
|
||||
|
||||
ditto -c -k --keepParent "$app" "$out/byre.zip"
|
||||
xcrun notarytool submit "$out/byre.zip" --keychain-profile byre-notary --wait
|
||||
xcrun stapler staple "$app"
|
||||
rm "$out/byre.zip"
|
||||
|
||||
dmg=byre-$version.dmg
|
||||
stage=$out/stage
|
||||
mkdir "$stage"
|
||||
ditto "$app" "$stage/Byre.app"
|
||||
ln -s /Applications "$stage/Applications"
|
||||
hdiutil create -volname byre -srcfolder "$stage" -format UDZO "$out/$dmg"
|
||||
rm -rf "$stage"
|
||||
codesign --force --timestamp --sign "$identity" "$out/$dmg"
|
||||
xcrun notarytool submit "$out/$dmg" --keychain-profile byre-notary --wait
|
||||
xcrun stapler staple "$out/$dmg"
|
||||
(cd "$out" && shasum -a 256 "$dmg" > "$dmg.sha256")
|
||||
|
||||
build=$(plutil -extract CFBundleVersion raw "$app/Contents/Info.plist")
|
||||
minimum=$(plutil -extract LSMinimumSystemVersion raw "$app/Contents/Info.plist")
|
||||
signature=$("$sparkle/bin/sign_update" --account byre "$out/$dmg")
|
||||
cat > "$out/appcast.xml" <<EOF
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
|
||||
<channel>
|
||||
<title>byre</title>
|
||||
<item>
|
||||
<title>byre $version</title>
|
||||
<pubDate>$(LC_ALL=C date -u "+%a, %d %b %Y %H:%M:%S +0000")</pubDate>
|
||||
<sparkle:version>$build</sparkle:version>
|
||||
<sparkle:shortVersionString>$version</sparkle:shortVersionString>
|
||||
<sparkle:minimumSystemVersion>$minimum</sparkle:minimumSystemVersion>
|
||||
<enclosure url="https://g.fc.run/$repo/releases/download/$tag/$dmg" type="application/octet-stream" $signature/>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
EOF
|
||||
|
||||
previous=$(git -C "$root" describe --tags --abbrev=0 "$tag^" || true)
|
||||
if [ -n "$previous" ]; then
|
||||
|
||||
Reference in New Issue
Block a user