GHA: add shellcheck job and fix warnings, shell tidy-ups - #13307
Closed
vszakats wants to merge 28 commits into
Closed
GHA: add shellcheck job and fix warnings, shell tidy-ups#13307vszakats wants to merge 28 commits into
vszakats wants to merge 28 commits into
Conversation
bagder
approved these changes
Apr 8, 2024
bagder
reviewed
Apr 8, 2024
vszakats
added a commit
that referenced
this pull request
Apr 11, 2024
- use `$()` instead of backticks, and re-arrange double-quotes inside.
- add missing `|| exit 1` to `cd` calls. (could be dropped by using `set -eu`.)
- add `-n` to a few `if`s.
- shorten redirections by using `{} >` (as shellcheck recommended).
- silence warnings where variables were detected as unused (SC2034).
- a couple misc updates to silence warnings.
- switch to bash shebang for `-ot` feature.
- split two lines to unbreak syntax highlighting in my editor. (`$(expr \`, `$(dirname \`)
Also enable CI checks for OS/400 shell scripts.
Ref: #13307
Closes #13309
Contributor
|
While I do perfer the newer command substitution syntax, the old syntax works in more places. I'm going to work around this locally by switching |
Member
Author
|
I think we can revert to the backticks for the few affected lines for maximum compatibility. PR: #13871 |
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jun 4, 2024
Make an exception for `curl-config` because this script that may be running on any target system, including old ones, e.g. SunOS 5.10. Reported-by: Alejandro R. Sedeño Ref: curl#13307 (comment) Follow-up to fa69b41 curl#13307 Closes curl#13871
vszakats
added a commit
that referenced
this pull request
Jun 4, 2024
Make an exception for `curl-config` because this script that may be running on any target system, including old ones, e.g. SunOS 5.10. Reported-by: Alejandro R. Sedeño Ref: #13307 (comment) Follow-up to fa69b41 #13307 Closes #13871
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Oct 2, 2024
Fixes intermittend CI failure because the shell-based random generator generated the same number twice: ``` $ openssl ca -config EdelCurlRoot-ca.cnf -revoke Server-localhost0h-sv.crt Using configuration from EdelCurlRoot-ca.cnf ERROR:Already revoked, serial number 66FDB23A make: *** [../../../tests/certs/Server-localhost0h-sv.pem] Error 1 ``` https://github.com/curl/curl/actions/runs/11151401083/job/30994755798?pr=15128#step:10:498 Follow-up to fa461b4 curl#14486 Follow-up to fa69b41 curl#13307
vszakats
added a commit
that referenced
this pull request
Oct 2, 2024
Generate the certificate serial numbers automatically instead of doing from shell (or Perl earlier). Fixes intermittent CI failures due to the shell-based random generator generating the same serial number twice: ``` $ openssl ca -config EdelCurlRoot-ca.cnf -revoke Server-localhost0h-sv.crt Using configuration from EdelCurlRoot-ca.cnf ERROR:Already revoked, serial number 66FDB23A make: *** [../../../tests/certs/Server-localhost0h-sv.pem] Error 1 ``` https://github.com/curl/curl/actions/runs/11151401083/job/30994755798?pr=15128#step:10:498 Follow-up to fa461b4 #14486 Follow-up to fa69b41 #13307 Closes #15129
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Generate the certificate serial numbers automatically instead of doing from shell (or Perl earlier). Fixes intermittent CI failures due to the shell-based random generator generating the same serial number twice: ``` $ openssl ca -config EdelCurlRoot-ca.cnf -revoke Server-localhost0h-sv.crt Using configuration from EdelCurlRoot-ca.cnf ERROR:Already revoked, serial number 66FDB23A make: *** [../../../tests/certs/Server-localhost0h-sv.pem] Error 1 ``` https://github.com/curl/curl/actions/runs/11151401083/job/30994755798?pr=15128#step:10:498 Follow-up to fa461b4 curl#14486 Follow-up to fa69b41 curl#13307 Closes curl#15129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13307
set -eu, fix shellcheck, make reproducible and smaller tarballs #13299MacOSX-Frameworkmight use an overhaul. build: remove MacOSX-Framework script #13313Without whitespace changes: https://github.com/curl/curl/pull/13307/files?w=1