[Merged by Bors] - Small script fix#2591
Conversation
tools/publish.sh
Outdated
| ) | ||
|
|
||
| cd crates | ||
| cd crates || exit |
There was a problem hiding this comment.
I think set -ex or something like that should be used.
tools/publish.sh
Outdated
| ) | ||
|
|
||
| cd crates | ||
| cd crates || set -ex |
There was a problem hiding this comment.
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.
DJMcNab
left a comment
There was a problem hiding this comment.
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.
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
| bevy_internal | ||
| bevy_dylib | ||
| ) | ||
| set -eou pipefail |
There was a problem hiding this comment.
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.
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.