From fa8b63c7af5b66890bbf172be6bc7fca48571b56 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 23 Aug 2024 00:18:00 -0400 Subject: [PATCH] forgejo-ci: if not draft, nuke file from -testing branch --- .forgejo/bin/deploy.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.forgejo/bin/deploy.sh b/.forgejo/bin/deploy.sh index 2499838..3a4fb0a 100755 --- a/.forgejo/bin/deploy.sh +++ b/.forgejo/bin/deploy.sh @@ -15,7 +15,11 @@ for apk in $apkgs; do name=$(echo $apk | awk -F '/' '{print $4}') if [ "$(curl -s $GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/pulls/$GITHUB_EVENT_NUMBER | jq .draft)" == "true" ]; then + # if draft, send to -testing branch branch="$branch-testing" + else + # if not draft, assume that this was sent to $branch-testing and nuke it + curl -s --user $FORGE_REPO_USER:$FORGE_REPO_TOKEN -X DELETE $TARGET_REPO/$BASEBRANCH/$branch-testing/$arch/$name fi echo "Sending $name of arch $arch to $TARGET_REPO/$BASEBRANCH/$branch"