-
Notifications
You must be signed in to change notification settings - Fork 37
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
Cleanup (ShellCheck, whitespace unification) #74
Cleanup (ShellCheck, whitespace unification) #74
Conversation
Not sure how to interpret the build error:
https://github.com/AcademySoftwareFoundation/aswf-docker/pull/74/checks?check_run_id=1146534800 |
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.
Thanks @Simran-B ! That's a lot of double quotes ;-)
Happy to merge as it seems cleaner indeed, except for the export PATH
change which seems it would have an effect on cmake subprocess, unless I'm mistaken?
Addressed your comment. The only open point is:
|
|
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.
Looks good, thank!
Looks like there's an error on build here:
|
The problem happens when scripts/common/install_sonar.sh is called. Once the local SonarCloud scanner wrapper has been installed, it is called with --help to print out command line options:
but it looks like
ensures that the script will abort on any errors. I imagine the same error would also happen a bit further down with:
Before this PR, these commands were simply:
I'm not sure why running them in a subshell via Looking at ShellCheck Style it seems to explicitly call out: echo "$(date)" # Useless use of echo |
Inside an ASWF container if I try:
it does appear that
it seems that the new code which wraps the called to So if anything the changes should make the script work, not make it fail? |
It actually makes sense. The exit code of the sub-command is only accessible from within echo $(./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --help; echo $?)
... 10
echo $(./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --help); echo $?
...
0 Using command substitution suppresses the non-zero exit code. It's feels strange that it returns 10 in case of Reverted my change and added a note. |
I'm probably reading the previous build failure log incorrectly: https://github.com/AcademySoftwareFoundation/aswf-docker/runs/1162762399?check_suite_focus=true echo $(build-wrapper-linux-x86-64) |
It did have the command wrapped:
I removed the wrapping
Oh, the exit code makes a lot more sense then! |
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.
Thanks for the updates!
Would you be OK resolving the conflicts @Simran-B ? |
Signed-off-by: Simran Spiller <simran.spiller@gmail.com>
Signed-off-by: Simran Spiller <simran.spiller@gmail.com>
Signed-off-by: Simran Spiller <simran.spiller@gmail.com>
Signed-off-by: Simran Spiller <simran.spiller@gmail.com>
Signed-off-by: Simran Spiller <simran.spiller@gmail.com>
Signed-off-by: Simran Spiller <simran.spiller@gmail.com>
Signed-off-by: Simran Spiller <simran.spiller@gmail.com>
7200b5d
to
f3ce32d
Compare
@aloysbaillet Conflicts should be resolved now. |
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.
Thanks!
Not sure what your stand is on whitespace changes. I'm happy to revert those.
But using double quotes around paths seems like a good idea - if e.g. $DOWNLOAD_DIR was changed to a path with a space in it, it would break.
Using quotes here is a bit too much, so I did no change it:
make -j$(nproc)
In cases like
sh bootstrap.sh ${BOOTSTRAP_ARGS}
, there are intentionally no quotes I suppose.Not sure about the following in
scripts\base\build_boost.sh
:In
scripts\common\install_sonar.sh
there are two warnings:Does the pattern serve any particular purpose?
echo $(sonar-scanner --help)
I substituted
`cmd`
by$(cmd)
as suggestedCI_COMMON_VERSION
was set twice inci-common/Dockerfile
and I combined the two ENVs