Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upClean shell scripts #7826
Merged
Clean shell scripts #7826
Conversation
elamperti left a comment
Good work here, @zapashcanon ! |
npm publish | ||
cd - | ||
) |
This comment has been minimized.
This comment has been minimized.
elamperti
Mar 16, 2018
This is a nice trick! Though I'm not sure if it'd be clear for everyone what is it doing. I'd stick with the cd -
just for clarity.
This comment has been minimized.
This comment has been minimized.
zapashcanon
Mar 18, 2018
Author
Contributor
I can add a comment like: using a subshell to avoid having to cd back
.
It's not just to avoid writing a line, it also can prevent some troubles, see SC2013.
This comment has been minimized.
This comment has been minimized.
elamperti
Mar 18, 2018
Oh, I didn't know about that one! It should be modified then. The comment would be helpful :)
This comment has been minimized.
This comment has been minimized.
scripts/release.sh
Outdated
if [[ -z $RELEASE_TAG ]]; then | ||
npm publish | ||
else | ||
npm publish --tag $RELEASE_TAG | ||
npm publish --tag "$RELEASE_TAG" | ||
fi | ||
cd - |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
zapashcanon
Mar 18, 2018
Author
Contributor
Indeed. Will do. I'm not sure if shellcheck would have spotted it after running it a second time. Will try. If not, we may found a bug....
This comment has been minimized.
This comment has been minimized.
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.
zapashcanon commentedMar 13, 2018
•
edited
Hi,
I fixed various things spotted by shellcheck.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch for v2.x (or to a previous version branch), not themaster
branchfix #xxx[,#xxx]
, where "xxx" is the issue number)