-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Merged by Bors] - Small script fix #2591
Conversation
tools/publish.sh
Outdated
@@ -33,13 +33,13 @@ crates=( | |||
bevy_dylib | |||
) | |||
|
|||
cd crates | |||
cd crates || exit |
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.
I think set -ex
or something like that should be used.
tools/publish.sh
Outdated
@@ -33,13 +33,13 @@ crates=( | |||
bevy_dylib | |||
) | |||
|
|||
cd crates | |||
cd crates || set -ex |
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.
I actually mean set -ex
on top of the file and then remove the || exit 1
. It should have been set -eou pipefail
instead of set -ex
it seems by the way. set -e
causes the script to exit if any command exists with a non-zero exit code. set -u
causes undefined variables to be treated as error. set -o pipefail
causes pipelines (|
) to exit with a non-zero exit code if any command that is part of it exits with a non-zero exit code.
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.
Not an expert in these matters, but none of these changes are very scary.
@@ -3,16 +3,16 @@ | |||
duration='2' | |||
function wait_seconds() { perl -e 'alarm shift; exec @ARGV' "$@"; } |
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.
This should probably not be calling into perl, and this entire script should instead just be a cargo xtask
style command (for cross platform compatibility).
However, that's out of scope for this PR - this is an improvement.
tools/publish.sh
Outdated
@@ -32,14 +32,15 @@ crates=( | |||
bevy_internal | |||
bevy_dylib | |||
) | |||
set -eou pipefail |
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.
This means that in case of failure to publish crates, it will stop on the first failure instead of ignoring and continuing for other crates. I don't know the intended behaviour as it's a tool used only by @cart though.
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.
yeah i like the current behavior, lets keep that for now.
bors r+ |
# Objective Prevent some possible problem Found by IntelliJ IDEA ## Solution Double quoting variable and exit on possible failure of cd command.
Objective
Prevent some possible problem
Found by IntelliJ IDEA
Solution
Double quoting variable and exit on possible failure of cd command.