Skip to content
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

Update release script #465

Merged
merged 1 commit into from
Mar 3, 2017

Conversation

cdrage
Copy link
Member

@cdrage cdrage commented Mar 1, 2017

Had an issue where I don't git pull / merge with master after the PR has
been merged.

This adds an option to sync with master before continuing.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 1, 2017
@cdrage cdrage mentioned this pull request Mar 1, 2017

git_sync() {
cd $CLI
git pull origin
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about this :-(
Isn't origin pointing to fork? It should pull from upstream no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yeah, you're right. Should be pulling from upstream.

@cdrage cdrage force-pushed the update-release-script-resync branch from 04f37fe to 15fe66d Compare March 3, 2017 15:21
@cdrage
Copy link
Member Author

cdrage commented Mar 3, 2017

@kadel Updated :)

@@ -71,6 +71,7 @@ clone() {
cd $CLI
git remote remove origin
git remote add origin git@github.com:$ORIGIN_REPO/$CLI.git
git remote add upstream git@github.com:$UPSTREAM_REPO/$CLI.git
Copy link
Member

Choose a reason for hiding this comment

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

Can we maybe https instead of ssh? It will prevent accidental pushes to upstream.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd prefer it SSH to be honest... Having to enter http credentials each-time is a kill-joy. I have no arguments to say that ssh is any better haha. Just personal preference of mine.

Copy link
Member

Choose a reason for hiding this comment

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

But you never push to upstream.

This is why I suggested https, so auth prompt pops-up and you know that you are pushing to wrong remote.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahhhhh, I get it. So https for upstream and ssh for origin and then we have the best of both-worlds.


git_sync() {
cd $CLI
git pull upstream
Copy link
Member

Choose a reason for hiding this comment

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

I still think this won't work. You should also specify branch.
git pull upstream master I would probably use fetch here. git fetch upstream master

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm. It should work, I just tested it out and it pulled an updated branch of gh-pages I recently commited to. I'll update the script!

Copy link
Member

Choose a reason for hiding this comment

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

I've tried and got:

You asked to pull from the remote 'upstream', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.

@cdrage cdrage force-pushed the update-release-script-resync branch from 15fe66d to 55e9236 Compare March 3, 2017 15:36
Had an issue where I don't git pull / merge with master after the PR has
been merged.

This adds an option to sync with master before continuing.
@cdrage cdrage force-pushed the update-release-script-resync branch from 55e9236 to 4e3b1c3 Compare March 3, 2017 15:48
@kadel kadel merged commit e631960 into kubernetes:master Mar 3, 2017
@cdrage cdrage deleted the update-release-script-resync branch March 30, 2017 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants