diff --git a/pubspec.yaml b/pubspec.yaml index 69a0818..ead9467 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.9.14 +version: 0.9.15 environment: sdk: ^3.10.1 diff --git a/release.sh b/release.sh index 57ab7d3..1770154 100755 --- a/release.sh +++ b/release.sh @@ -84,3 +84,17 @@ curl -sS -X POST \ "${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases/${release_id}/assets" echo "APK hochgeladen." + +# Nur die drei neuesten Releases behalten, ältere löschen +all_releases=$(curl -sS \ + -H "Authorization: token ${GITEA_TOKEN}" \ + "${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases") + +echo "$all_releases" | jq -r 'sort_by(.created_at) | .[0:-3] | .[]? | "\(.id)\t\(.tag_name)"' | while IFS=$'\t' read -r old_id old_tag; do + echo "Lösche altes Release: ${old_tag} (ID ${old_id})" + curl -sS -X DELETE \ + -H "Authorization: token ${GITEA_TOKEN}" \ + "${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}/releases/${old_id}" >/dev/null +done + +echo "Ältere Releases bereinigt; es bleiben die letzten drei." diff --git a/release/eggtimer.apk b/release/eggtimer.apk index 6a0e24e..6fed42f 100644 Binary files a/release/eggtimer.apk and b/release/eggtimer.apk differ