10
0
Fork 0
mirror of https://code.forgejo.org/actions/forgejo-release synced 2026-04-08 19:04:17 +00:00

feat: refactor and error handling

This commit is contained in:
Michael Kriese 2026-02-17 22:29:32 +01:00
parent 47f2d7a74e
commit f818df06f9
No known key found for this signature in database
GPG key ID: F8D7748549A5986A
2 changed files with 32 additions and 30 deletions

View file

@ -6,15 +6,15 @@ PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '
test_teardown() {
setup_api
api DELETE repos/$REPO/releases/tags/$TAG || true
api DELETE repos/$REPO/tags/$TAG || true
api_json DELETE repos/$REPO/releases/tags/$TAG || true
api_json DELETE repos/$REPO/tags/$TAG || true
rm -fr dist/release
}
test_reset_repo() {
local project="$1"
api DELETE repos/$REPO || true
api POST user/repos --data-raw '{"name":"'$project'", "auto_init":true}'
api_json DELETE repos/$REPO || true
api_json POST user/repos --data-raw '{"name":"'$project'", "auto_init":true}'
git clone $FORGEJO/$REPO $TMP_DIR/repo
SHA=$(git -C $TMP_DIR/repo rev-parse HEAD)
}