add scripts/upgrade-packagespec#10276
Conversation
- 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" |
There was a problem hiding this comment.
I feel like maybe this should delete the temporary directory, but probably it should cd ..?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I see the cd $CLONEDIR but nothing to put you back after all the git commands have run?
There was a problem hiding this comment.
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.
|
Is this one still needed @samsalisbury? Looks like tests are failing. |
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
Please see the documentation comments at the head of the script for info on how this works.