Skip to content

Clean shell scripts #7826

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
merged 1 commit into from
Mar 22, 2018
Merged

Clean shell scripts #7826

merged 1 commit into from
Mar 22, 2018

Conversation

zapashcanon
Copy link
Contributor

@zapashcanon zapashcanon commented Mar 13, 2018

Hi,

I fixed various things spotted by shellcheck.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

Copy link

@elamperti elamperti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work here, @zapashcanon ! 👍

npm publish
cd -
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't know about that one! It should be modified then. The comment would be helpful :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

if [[ -z $RELEASE_TAG ]]; then
npm publish
else
npm publish --tag $RELEASE_TAG
npm publish --tag "$RELEASE_TAG"
fi
cd -

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case, for consistency, shouldn't this cd - be replaced as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened an issue. :)

@yyx990803 yyx990803 merged commit 943e5c2 into vuejs:dev Mar 22, 2018
f2009 pushed a commit to f2009/vue that referenced this pull request Jan 25, 2019
aJean pushed a commit to aJean/vue that referenced this pull request Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants