feat: use tea binary from system if available #53
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
actions/forgejo-release!53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "sheik/forgejo-release:feat/universal_tea_bin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As a proposal solution to this issue: #51
We use the system installed tea binary if available or download it as it was done before if not.
The location of the binary is stored in a new variable
$TEA_BINwhich replaces the need for the$ BIN_DIRlocation.I tested it on Alpine and Debian.
Good workaround 👍
CI fails
I looked at the CI logs but nothing suggests this is related to this PR. It looks like some king of GPG signature issue?
These are the error lines :
Are the keys expired by any chance? Can you check it out?
#55
pushed a fake PR to ensure the CI is working as it should
@earl-warren wrote in #53 (comment):
Any news on fixing the CI? The fake PR fails with the same reason.
I forgot about it, my bad. There evidently is something environmental broken in the CI. Older runs fail when re-run.
https://code.forgejo.org/actions/forgejo-release/actions/runs/510/jobs/0#jobstep-4-639
The GPG keys used in the CI expired. This will be fixed, please rebase when the PR is merged. Thanks for the reminder, it turned out to be an easy mistake to fix. Sorry it took so long.
You can rebase, it should work. Rather... if it fails that will be for a different reason 😁
d5c70cdd095f6f05b24eUse tea binary from system if availableto feat: use tea binary from system if availabletwo small requests for change and then good to merge
@ -25,3 +25,3 @@setup_tea() {if ! test -f "$BIN_DIR"/tea; thenif which tea; thenwhich tea 2>/dev/nullto reduce the noise when it is not found.Done. I wasn't get any noise when it wasn't not found but it's still good practice I guess.
@ -27,1 +27,3 @@if ! test -f "$BIN_DIR"/tea; thenif which tea; thenTEA_BIN=$(which tea)elif ! test -f $TEA_BIN; thenelseis enough here don't you think?For sure. Fixed now.
@ -26,2 +26,3 @@setup_tea() {if ! test -f "$BIN_DIR"/tea; thenif which tea; thenTEA_BIN=$(which tea)Note to self: this is not covered by any test but it also is quite trivial so why not.
If you give me a minute, I started giving it a go.
I added 2 tests for each of the conditions in
setup_tea(). I'm not used to write tests for bash scripts that interact with system packages and so on so my approach might not be the best. Feel free to give me feedback, change anything or scrap them entirely if you prefer to handle this at a later time.5f6f05b24e85ec83849a7652117d8ffb44c1490cfb44c1490cefbafaf169Perfect ✨