Re-organize build scripts, add to shellcheck - #2380
Conversation
I noticed that ansible.cfg isn't used anywhere in the repo so can go away.
1f9b1e9 to
a908fa0
Compare
PostgreSQL Extension Dependency Analysis: PR #2380
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
PostgreSQL Package Dependency Analysis: PR #2380
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
hunleyd
left a comment
There was a problem hiding this comment.
.github/workflows/check-shellscripts.yml — "scripts aren't being shellchecked in CI" is still true after this PR. Fix: add a third scandir: './ebssurrogate/scripts' step.
Most of these files aren't being used so no point having them in the tree. Its a little weird to have cleanup-qemu.sh in ebssurrogate subdir but there's already one file there so meh.
These are all pretty mechanical cleanups/simplifications + making
shellcheck happy. Using <<- flavored heredocs is nice to have because we
get better indentation based code scanning. I used [[ ]] and (( ))
bashism because they are better than POSIX they replace.
I also dropped unnecessary `${}` and `var="..."` for both consistency
and because I like it better that way :D. The real reason is I think
over-user of `${}` can lead to thinking its same as `"$"` for safety (
its not) and also tends to lead to inconsistent use. Variable assignment
doesn't need quotes because expansion does not take place in bash.
sudo/su isn't needed in many of the invocations, most of the scripts are
run as root, all except for nix-provision.sh. Almost every command in
nix-provision.sh is run with sudo so I changed packer to run the whole
script with sudo instead, like done for stage1.
a908fa0 to
f1ca18a
Compare
|
Thanks for the review @hunleyd, I addressed all the points (will resolve comments in a moment). I had left out the |
I wanted it in nix/git-hooks so that it can be used as Nix CI required check |
What kind of change does this PR introduce?
Maintenance
What is the current behavior?
Image build scripts are split between ebssurroage and scripts dir, most of those in scripts/ aren't even used. The scripts aren't being shellchecked in CI.
What is the new behavior?
Moved useful scripts into ebssurrogate and made them shellcheck clean. I added a shellcheck lint to git-hooks too. Dropped ansible.cfg since I noticed its not used and might as well do so now.