-
Notifications
You must be signed in to change notification settings - Fork 4
feat: support ash (alpine) #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
rewrote the scripts to use features that are available in both ash and bash. I think the largest change is the switch to no longer use bash arrays, and the use of [ over [[, although it seems alpine-latest has some [[ executable although i'm not sure if that would exist on older alpine versions we'd want to support.
the previous iteration was not properly handling spaces in arguments that users would pass and in the eval that runs the codecov command, those args would get split by their spaces, so now we quote the arguments and we escape whatever quotes they may contain.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #59 +/- ##
=======================================
Coverage 97.14% 97.14%
=======================================
Files 2 2
Lines 35 35
=======================================
Hits 34 34
Misses 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please aggressively test this out withe changing args from an array to a string. I'm pretty sure this won't work and it'll break functionality, but I could be wrong
.github/workflows/ci.yml
Outdated
- push | ||
- pull_request | ||
jobs: | ||
run: | ||
test: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test: | |
test-linux: |
@@ -11,20 +11,22 @@ else | |||
fi | |||
say "$g ->$x Token length: ${#token}" | |||
token_str="" | |||
token_arg=() | |||
token_arg="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh this might break things. there's a reason this has to be an array as the string command gets kind of messed up when you run the command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arrays don't exist in ash 😭
it seems like the way to make sure that the string command does not get messed up is by wrapping all arguments in single quotes, which is fine because i don't think we need double quotes (which allows for substituting in the values of variables, my assumption is that anything the codecov sh gets passed will already have variables substituted in)
rewrote the scripts to use features that are available in both ash and
bash. I think the largest change is the switch to no longer use bash
arrays, and the use of [ over [[, although it seems alpine-latest
has some [[ executable although i'm not sure if that would exist on
older alpine versions we'd want to support.