iOS 0.11.0 (build 67): Eze-style v<version> tags, source.json lists org.cdnutter.stemify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5344bbfd21
commit
8d3251dbc5
5 files changed
+18
-18
No files matched your search
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Writes ios/source.json, an AltStore source (SideStore and Feather read it too), from the
|
||||
ios-v* releases on Gitea. Only releases with a stemify-<version>.ipa are listed, since older
|
||||
ones used a different bundle ID. Set GITEA_TOKEN if the repo is private."""
|
||||
v* releases on Gitea (org.cdnutter.stemify). The older ios-v* releases were org.cdnutter.stemify-pub
|
||||
and are left out. Set GITEA_TOKEN if the repo is private."""
|
||||
import json, os, re, urllib.request
|
||||
|
||||
REPO = "https://gitea.iamchrisama.com/cdnutter/stemify"
|
||||
@@ -34,10 +34,10 @@ builds[slug] = re.search(r'CURRENT_PROJECT_VERSION: "(.*)"', yml)[1]
|
||||
|
||||
versions = []
|
||||
for rel in get(API + "/releases?limit=50"):
|
||||
v = rel["tag_name"].removeprefix("ios-v")
|
||||
v = rel["tag_name"].removeprefix("v")
|
||||
ipa = next((a for a in rel["assets"] if a["name"] == f"stemify-{v}.ipa"), None)
|
||||
# Pre-releases are dev builds (org.cdnutter.stemify-dev), they go to Sideload Developer instead.
|
||||
if not rel["tag_name"].startswith("ios-v") or not ipa or rel["prerelease"]:
|
||||
if not rel["tag_name"].startswith("v") or not ipa or rel["prerelease"]:
|
||||
continue
|
||||
versions.append({
|
||||
"version": v.split("-")[0],
|
||||
|
||||
@@ -1,32 +1,31 @@
|
||||
#!/bin/bash
|
||||
# Publishes an IPA built by build-remote.sh. Run from DevOps with everything committed.
|
||||
# publish.sh dev on the dev branch: Gitea pre-release ios-v<v>-dev.<build> + Sideload Developer (WHITE-M1 :8093, ?source=dev)
|
||||
# publish.sh public on main, only when the owner says so: Gitea release ios-v<v> + Personal (:8093, ?source=personal), then source.json
|
||||
# publish.sh dev on the dev branch: Gitea pre-release v<v>-dev.<build> + iOS Repos /dev (WHITE-M1 :8093, ?source=dev)
|
||||
# publish.sh public on main, only when the owner says so: Gitea release v<v> + iOS Repos /personal (:8093, ?source=personal), then source.json
|
||||
# Release notes come from $NOTES, else the last commit subject. signed builds are never published.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
MODE=${1:-}; NAME=stemify; TAGP=ios-v
|
||||
MODE=${1:-}; NAME=stemify; TAGP=v
|
||||
API=https://gitea.iamchrisama.com/api/v1/repos/cdnutter/stemify
|
||||
T=$(sed -n 's#.*://cdnutter:\([^@]*\)@.*#\1#p' ~/.config/gitea/cdnutter.credentials | head -1)
|
||||
V=$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ (rc|beta) /-\1/; s/ /-/g')
|
||||
BUILD=$(sed -nE 's/^ *CURRENT_PROJECT_VERSION: "(.*)"/\1/p' project.yml)
|
||||
LABEL=$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml)
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
die() { echo "$*" >&2; exit 1; }
|
||||
case $MODE in
|
||||
dev) WANT=dev; IPA=build/dev/$NAME-$V-dev.ipa; TAG=$TAGP$V-dev.$BUILD; TITLE="Stemify iOS $LABEL Dev Build $BUILD"; PRE=true; UP=http://10.0.0.11:8093; Q='?source=dev' ;;
|
||||
public) WANT=main; IPA=build/public/$NAME-$V.ipa; TAG=$TAGP$V; TITLE="Stemify iOS $LABEL"; PRE=false; UP=http://10.0.0.11:8093; Q='?source=personal' ;;
|
||||
dev) WANT=dev; IPA=build/dev/$NAME-$V-dev.ipa; TAG=$TAGP$V-dev.$BUILD; PRE=true; UP=http://10.0.0.11:8093; Q='?source=dev' ;;
|
||||
public) WANT=main; IPA=build/public/$NAME-$V.ipa; TAG=$TAGP$V; PRE=false; UP=http://10.0.0.11:8093; Q='?source=personal' ;;
|
||||
*) die "usage: $0 dev|public" ;;
|
||||
esac
|
||||
[ "$BRANCH" = "$WANT" ] || die "$MODE builds publish from $WANT (on $BRANCH)"
|
||||
[ -f "$IPA" ] || die "missing $IPA, run scripts/build-remote.sh $MODE"
|
||||
git diff --quiet HEAD || die "uncommitted changes"
|
||||
[ "$(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: token $T" $API/releases/tags/$TAG)" = 404 ] \
|
||||
|| die "$TAG already exists, bump CURRENT_PROJECT_VERSION (dev) or VERSION_LABEL (release)"
|
||||
|| die "$TAG already exists, bump CURRENT_PROJECT_VERSION (dev) or VERSION_LABEL (public)"
|
||||
git push -q -u origin $BRANCH
|
||||
BODY=${NOTES:-$(git log -1 --format=%s)}
|
||||
ID=$(jq -n --arg t "$TAG" --arg n "$TITLE" --arg c "$(git rev-parse HEAD)" --arg b "$BODY" --argjson p $PRE \
|
||||
'{tag_name:$t, target_commitish:$c, name:$n, body:$b, prerelease:$p}' |
|
||||
ID=$(jq -n --arg t "$TAG" --arg c "$(git rev-parse HEAD)" --arg b "$BODY" --argjson p $PRE \
|
||||
'{tag_name:$t, target_commitish:$c, name:$t, body:$b, prerelease:$p}' |
|
||||
curl -fsS -H "Authorization: token $T" -H 'Content-Type: application/json' -d @- $API/releases | jq -r .id)
|
||||
curl -fsS -o /dev/null -H "Authorization: token $T" -F "attachment=@$IPA" "$API/releases/$ID/assets?name=$(basename $IPA)"
|
||||
curl -fsS -o /dev/null -X POST --data-binary @$IPA "$UP/api/upload/ipa$Q"
|
||||
|
||||
Reference in new issue
Block a user