8000 Add auto make merge by Seluj78 · Pull Request #660 · python/python-docs-fr · GitHub
[go: up one dir, main page]

Skip to content

Add auto make merge #660

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 6 commits into from
Apr 8, 2019
Merged

Add auto make merge #660

merged 6 commits into from
Apr 8, 2019

Conversation

Seluj78
Copy link
Collaborator
@Seluj78 Seluj78 commented Apr 5, 2019

No description provided.

@JulienPalard
Copy link
Member

It would be great if the cpython sha1 in .travis.yml gets updated too

@Seluj78
Copy link
Collaborator Author
Seluj78 commented Apr 5, 2019
mais ça nécessite d'avoir pré-cloné cpython
ou alors tu fais la branche après
fais le make merge en premier, sur la 3.7, sans commit
comme ça ça clone cpython
puis git checkout -b 
il faut faire le sed dans le .travis.yml aussi
pour changer le commit upstream```

@JulienPalard
Copy link
Member

Not for editing .travis, it can be done at the end.

@Seluj78
Copy link
Collaborator Author
Seluj78 commented Apr 5, 2019

TODO:

  • git -C ../cpython rev-parse --short HEAD
  • sed .travis.yml

@JulienPalard
Copy link
Member

And while you're at it, but it's more complicated, you can name the branch with the sha1 from cpython instead of the sha1 from python-docs-fr (so you'll have to create the branch after merging (you're not garanteed to have cpython before merging))

@Seluj78
Copy link
Collaborator Author
Seluj78 commented Apr 5, 2019

Here's my idea of the flow of this script on a server. It will be hosted on a small thingy somewhere, executed by a cron job.

Cron job:

  • rm /tmp/python-docs-fr && git clone https://github.com/USERTHATWILLDOTHEPR/python-docs-fr /tmp/python-docs-fr && cd /tmp/python-docs-fr && bash make-merge.sh

The script will:

  • Clone latest cpython in /tmp/cpython
  • get the latest commit from cpython git -C ../cpython rev-parse --short HEAD
  • Create a new branch named upstream-merge-$(CPYTHON_SHA) and checkout the branch
  • Sed .travis.yml old sha to new $(CPYTHON_SHA)
  • run make merge
  • install pyhub-pr
  • commit and push changes to fork
  • create PR

@JulienPalard
Copy link
Member

So apart of make merge, nothing versionned here? Works for me.

@Seluj78
Copy link
Collaborator Author
Seluj78 commented Apr 5, 2019

Well .travis.yml and the files from make merge will be modified and committed

@JulienPalard
Copy link
Member

yep I meant the cron script

@Seluj78
Copy link
Collaborator Author
Seluj78 commented Apr 5, 2019

Well the cron script will be on a server somewhere, and won't change, this is why the process is on this file on the repository that will be cloned

@JulienPalard JulienPalard merged commit 3cd2a5e into python:3.7 Apr 8, 2019
@JulienPalard
Copy link
Member

👍

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.

2 participants
0