krz/moonrise

Night-sky companion for iPhone, Apple Watch and Vision Pro: what's up tonight, the Moon, planets, launches and missions, and a Library of the solar system. SwiftUI app with a Cloudflare Workers backend. astronomy cloudflare-workers ios night-sky space swiftui visionos watchos

Commit ebe431af73

ebe431af7300bbf147dc10ea31daee64575cf044

parent: 514a4db6ad

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-07 14:14 UTC

Use appstore-kit for the release script and header

Layout: unified · split

App/AppStore/header.conf added +12
@@ -0,0 +1,12 @@
1# Product page header: three iPhones fanned over the icon's night sky and red horizon.
2# Render with appstore-kit: ../appstore-kit/render-header.sh App/AppStore
3background='radial-gradient(ellipse 55% 75% at 50% 30%, #1c2c4a 0%, #0a1424 55%, #05080f 100%)'
4left=04-3d
5center=01-sky
6right=08-jupiter
7extra_css='
8 body::after {
9 content: ""; position: absolute; left: 0; right: 0; bottom: 0;
10 height: calc(200 * var(--u)); background: #05080f; border-top: calc(10 * var(--u)) solid #e03d30; z-index: 3;
11 }
12 .iphone { box-shadow: 0 0 0 calc(4 * var(--u)) rgba(255, 255, 255, 0.14), 0 calc(50 * var(--u)) calc(120 * var(--u)) rgba(0, 0, 0, 0.6); }'
App/AppStore/header.html deleted −46
@@ -1,46 +0,0 @@
1<!doctype html>
2<!-- Product page header: three iPhones fanned over the icon's night sky and red horizon.
3 header.html renders the 21:9 header (3840x1646), header.html#wide the 16:9 one (5244x2950),
4 with headless Chromium, then the alpha channel is removed:
5 Chromium --headless --hide-scrollbars --force-device-scale-factor=1 --window-size=3840,1646 --screenshot=header-21x9.png header.html
6 Chromium --headless --hide-scrollbars --force-device-scale-factor=1 --window-size=5244,2950 --screenshot=header-16x9.png "file://$PWD/header.html#wide"
7 magick header-21x9.png -alpha off PNG24:header-21x9.png -->
8<html>
9<head>
10<meta charset="utf-8">
11<style>
12 :root { --u: 1px; --top: 180px; }
13 * { box-sizing: border-box; }
14 html, body { margin: 0; width: 3840px; height: 1646px; overflow: hidden; }
15 body {
16 position: relative;
17 background:
18 radial-gradient(ellipse 55% 75% at 50% 30%, #1c2c4a 0%, #0a1424 55%, #05080f 100%);
19 }
20 body::after {
21 content: ""; position: absolute; left: 0; right: 0; bottom: 0;
22 height: calc(200 * var(--u)); background: #05080f; border-top: calc(10 * var(--u)) solid #e03d30; z-index: 3;
23 }
24 .iphone {
25 position: absolute; left: 50%; top: var(--top);
26 width: calc(860 * var(--u)); height: calc(1868 * var(--u));
27 padding: calc(24 * var(--u)); border-radius: calc(140 * var(--u)); background: #0c0c12;
28 box-shadow: 0 0 0 calc(4 * var(--u)) rgba(255, 255, 255, 0.14), 0 calc(50 * var(--u)) calc(120 * var(--u)) rgba(0, 0, 0, 0.6);
29 }
30 .iphone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: calc(116 * var(--u)); }
31 .center { transform: translateX(-50%); z-index: 2; }
32 .left { transform: translate(calc(-50% - 760 * var(--u)), calc(120 * var(--u))) rotate(-8deg); }
33 .right { transform: translate(calc(-50% + 760 * var(--u)), calc(120 * var(--u))) rotate(8deg); }
34
35 /* 16:9, 5244x2950. */
36 html.wide { --u: 1.6px; --top: 420px; }
37 html.wide, .wide body { width: 5244px; height: 2950px; }
38</style>
39<script>if (location.hash === "#wide") document.documentElement.className = "wide";</script>
40</head>
41<body>
42 <div class="iphone left"><img src="screenshots/iphone-6.9/04-3d.png"></div>
43 <div class="iphone right"><img src="screenshots/iphone-6.9/08-jupiter.png"></div>
44 <div class="iphone center"><img src="screenshots/iphone-6.9/01-sky.png"></div>
45</body>
46</html>
App/README.org +2
@@ -29,3 +29,5 @@ Connect, signed through the Apple ID in Xcode. The version is
2929=git rev-list --count HEAD=, so each build maps to a commit.
3030=MOONRISE_PUBLISH=0= exports the =.ipa= to =.build/ios-release= without
3131uploading. The visionOS app is a separate product and is not uploaded.
32The script sources =release-ios.sh= from appstore-kit, checked out beside
33this repository or at =$APPSTORE_KIT=.
scripts/release-ios.sh +10 −60
@@ -1,63 +1,13 @@
11#!/bin/sh
2# Archives the iOS app (with its widgets and the watch app) and uploads it to App Store Connect,
3# signed automatically with the team's distribution certificate through the Apple ID signed in
4# to Xcode. The version is MARKETING_VERSION in App/project.yml; the build number is the commit
5# count on main, so every upload can be traced to a commit. The upload then shows in TestFlight
6# and can be picked for an App Store submission.
2# Archives the iOS app (with its widgets and the watch app) and uploads it to App Store Connect.
3# The version is MARKETING_VERSION in App/project.yml; the build number is the commit count on
4# main, so every upload can be traced to a commit. The work is done by appstore-kit, checked out
5# beside this repository or at $APPSTORE_KIT.
76# Usage: scripts/release-ios.sh
87# MOONRISE_PUBLISH 0 archives and exports the .ipa to .build/ios-release without uploading
9set -eu
10
11cd "$(dirname "$0")/.."
12publish="${MOONRISE_PUBLISH:-1}"
13team=ZCNAX3VL9D
14
15if [ "$publish" != 0 ]; then
16 [ -z "$(git status --porcelain)" ] || { echo "The working tree has changes." >&2; exit 1; }
17 [ "$(git branch --show-current)" = main ] || { echo "Release from main." >&2; exit 1; }
18fi
19
20version="$(sed -n 's/.*MARKETING_VERSION: "\(.*\)"/\1/p' App/project.yml | sort -u)"
21[ "$(printf '%s\n' "$version" | wc -l | tr -d ' ')" = 1 ] || { echo "The targets' MARKETING_VERSION differ: $version" >&2; exit 1; }
22build="$(git rev-list --count HEAD)"
23
24command -v xcodegen >/dev/null || { echo "Install XcodeGen: brew install xcodegen" >&2; exit 1; }
25(cd App && xcodegen generate --quiet)
26
27out=.build/ios-release
28rm -rf "${out:?}"
29mkdir -p "$out"
30archive="$out/moonrise.xcarchive"
31xcodebuild archive -project App/Moonrise.xcodeproj -scheme Moonrise -configuration Release \
32 -destination 'generic/platform=iOS' -archivePath "$archive" -allowProvisioningUpdates -quiet \
33 MARKETING_VERSION="$version" CURRENT_PROJECT_VERSION="$build"
34
35if [ "$publish" = 0 ]; then destination=export; else destination=upload; fi
36cat > "$out/ExportOptions.plist" <<PLIST
37<?xml version="1.0" encoding="UTF-8"?>
38<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
39<plist version="1.0">
40<dict>
41 <key>method</key>
42 <string>app-store-connect</string>
43 <key>destination</key>
44 <string>$destination</string>
45 <key>teamID</key>
46 <string>$team</string>
47 <key>signingStyle</key>
48 <string>automatic</string>
49 <key>manageAppVersionAndBuildNumber</key>
50 <false/>
51 <key>uploadSymbols</key>
52 <true/>
53</dict>
54</plist>
55PLIST
56xcodebuild -exportArchive -archivePath "$archive" -exportOptionsPlist "$out/ExportOptions.plist" \
57 -exportPath "$out/export" -allowProvisioningUpdates -quiet
58
59if [ "$publish" = 0 ]; then
60 echo "Exported $(ls "$out"/export/*.ipa): $version ($build), not uploaded"
61else
62 echo "Uploaded Moonrise $version ($build) to App Store Connect; it shows in TestFlight once processed"
63fi
8PUBLISH="${MOONRISE_PUBLISH:-1}"
9name=Moonrise
10project=App/Moonrise.xcodeproj
11scheme=Moonrise
12spec=App/project.yml
13. "${APPSTORE_KIT:-$(dirname "$0")/../../appstore-kit}/release-ios.sh"