fix: do not attempt to add assets if release dir is empty or nonexistent #104

Open
crueter wants to merge 4 commits from crueter/forgejo-release:no-release-dir into main
Contributor

Closes #54

All this does is a quick -n && -d check to see if
a. release-dir is actually set by the user
b. release-dir actually exists and has files in it

If release-dir does not exist OR contains no files, we warn the user.

Signed-off-by: crueter crueter@eden-emu.dev

Closes #54 All this does is a quick `-n && -d` check to see if a. `release-dir` is actually set by the user b. `release-dir` actually exists and has files in it If `release-dir` does not exist OR contains no files, we warn the user. Signed-off-by: crueter <crueter@eden-emu.dev>
feat: do not attempt to add assets if release dir is empty or nonexistent
Some checks failed
/ integration (pull_request) Has been cancelled
/ tests (pull_request) Has been cancelled
3e863c83a8
Signed-off-by: crueter <crueter@eden-emu.dev>
default
Some checks failed
/ integration (pull_request) Has been cancelled
/ tests (pull_request) Has been cancelled
beb58f8488
Signed-off-by: crueter <crueter@eden-emu.dev>
warn
Some checks failed
/ integration (pull_request) Has been cancelled
/ tests (pull_request) Has been cancelled
ecfdcf71d5
Signed-off-by: crueter <crueter@eden-emu.dev>
crueter changed title from feat: do not attempt to add assets if release dir is empty or nonexistent to fix: do not attempt to add assets if release dir is empty or nonexistent 2025-11-20 04:54:04 +00:00
@ -90,0 +90,4 @@
assets=("${assets[@]}" -a "$file")
done
else
echo "Warning: $RELEASE_DIR is empty or nonexistent. No assets will be uploaded."
Owner

i think it should fail if no assets are found

i think it should fail if no assets are found
crueter marked this conversation as resolved
fatal on empty assets
All checks were successful
/ tests (pull_request) Successful in 10s
/ integration (pull_request) Successful in 19m56s
5f29e47705
Signed-off-by: crueter <crueter@eden-emu.dev>
Author
Contributor

should be good now

should be good now
Contributor

Would be great if this was merged. Currently it is quite annoying to work around this issue.

Would be great if this was merged. Currently it is quite annoying to work around this issue.
viceice left a comment
Owner

I think it should fail on empty release-dir.

If you like a different behavior add a new option allow-empty-release-dir with is false by default

I think it should fail on empty `release-dir`. If you like a different behavior add a new option `allow-empty-release-dir` with is false by default
All checks were successful
/ tests (pull_request) Successful in 10s
/ integration (pull_request) Successful in 19m56s
Required
Details
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u no-release-dir:crueter-no-release-dir
git switch crueter-no-release-dir
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
actions/forgejo-release!104
No description provided.