Skip to content

add scripts/upgrade-packagespec#10276

Merged
samsalisbury merged 5 commits into
masterfrom
packagespec-upgrade-script
Apr 26, 2021
Merged

add scripts/upgrade-packagespec#10276
samsalisbury merged 5 commits into
masterfrom
packagespec-upgrade-script

Conversation

@samsalisbury
Copy link
Copy Markdown
Contributor

Please see the documentation comments at the head of the script for info on how this works.

- This is now more accurate and handles branch names with
  slashes and pluses better.

echo "==> All done: upgrade pushed to branch $NEW_BRANCH on ${REMOTES[$TARGET_REMOTE]}"

echo "==> ACTIONS FOR YOU: Open a PR with base: $BRANCH compare: $NEW_BRANCH"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I feel like maybe this should delete the temporary directory, but probably it should cd ..?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This one doesn't open a subshell, it just pushes the results to a branch directly, as this is unlikely to fail. It leaves the user in the same directory they started in.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see the cd $CLONEDIR but nothing to put you back after all the git commands have run?

Copy link
Copy Markdown
Contributor Author

@samsalisbury samsalisbury Oct 31, 2020

Choose a reason for hiding this comment

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

Ah, I understand the confusion. This script is executed by invoking the file ./scripts/upgrade-packagespec <args> hence it runs in its own shell, and when it exits you are back where you started. The similar merge script also runs in its own shell, but it starts an interactive subshell inside a different directory to hand control to the user there explicitly (but even there, after you exit the subshell you are back where you started). The only way for a script to change the directory of your shell is if you source it rather than execute it.

@mdeggies
Copy link
Copy Markdown
Member

Is this one still needed @samsalisbury? Looks like tests are failing.
Sorry I'm just seeing the requested review now!

Comment thread scripts/upgrade-packagespec Outdated
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
@vercel vercel Bot temporarily deployed to Preview – vault April 21, 2021 13:58 Inactive
@vercel vercel Bot temporarily deployed to Preview – vault-storybook April 21, 2021 13:58 Inactive
@samsalisbury samsalisbury merged commit ab9ed40 into master Apr 26, 2021
@samsalisbury samsalisbury deleted the packagespec-upgrade-script branch April 26, 2021 10:53
Ali-Razmjoo pushed a commit to fork-the-planet/vault that referenced this pull request Oct 22, 2025
)

* disable scarf for this package

* add changelog

* use correct changelog format

Co-authored-by: Evan Moncuso <46458931+emoncuso@users.noreply.github.com>
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.

4 participants