File tree Expand file tree Collapse file tree 2 files changed +59
-3
lines changed
.github/workflows/cron/sync-cpython Expand file tree Collapse file tree 2 files changed +59
-3
lines changed Original file line number Diff line number Diff line change 1+ name : python-3.9-sync-with-cpython
2+
3+ on :
4+ push :
5+ branches :
6+ - " 3.9"
7+ schedule :
8+ - cron : " 0 0 * * *"
9+
10+ jobs :
11+ sync :
12+ runs-on : ubuntu-latest
13+ env :
14+ VERSION : " 3.9"
15+ steps :
16+ - uses : actions/checkout@v2
17+ with :
18+ ref : ${{ env.VERSION }}
19+
20+ - name : Set env
21+ run : echo "LATEST_COMMIT_ID=$(git ls-remote https://github.com/python/CPython.git $VERSION | head -c 8)" >> $GITHUB_ENV
22+
23+ - name : Install Dependencies
24+ run : sudo apt-get install gettext
25+
26+ - name : Sync with CPython
27+ run : make clone && make merge && make rm_cpython
28+
29+ - name : Create Pull Request
30+ id : cpr
31+ uses : peter-evans/create-pull-request@v3
32+ with :
33+ commit-message : sync with cpython ${{ env.LATEST_COMMIT_ID }}
34+ committer : GitHub <noreply@github.com>
35+ author : github-actions[bot] <github-actions[bot]@users.noreply.github.com>
36+ base : ${{ env.VERSION }}
37+ branch : cron/sync/${{ env.VERSION }}
38+ delete-branch : true
39+ title : ' Sync with CPython ${{ env.VERSION }}'
40+ body : |
41+ Sync with CPython ${{ env.VERSION }}
42+ labels : |
43+ sync-cpython
44+ automation
45+ team-reviewers : |
46+ owners
47+ maintainers
48+
49+ - name : Check outputs
50+ run : |
51+ echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
52+ echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
Original file line number Diff line number Diff line change @@ -27,15 +27,15 @@ JOBS = 1
2727
2828
2929.PHONY : all
30- all : $(VENV ) /bin/sphinx-build $(VENV ) /bin/blurb $( SPHINX_CONF )
30+ all : $(VENV ) /bin/sphinx-build $(VENV ) /bin/blurb clone
3131mkdir -p $(LC_MESSAGES )
3232for dirname in $$ (find . -name ' *.po' | xargs -n1 dirname | sort -u | grep -v ' ^\.$$' ); do mkdir -p $( LC_MESSAGES) /$$ dirname; done
3333for file in * .po * /* .po; do ln -f $$ file $( LC_MESSAGES) /$$ file; done
3434. $(VENV ) /bin/activate; $(MAKE ) -C $(CPYTHON_CLONE ) /Doc/ SPHINXOPTS=' -j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE )
3535
3636
37- $( SPHINX_CONF ) :
38- git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE )
37+ clone :
38+ git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE ) || echo " cpython exists "
3939cd $(CPYTHON_CLONE ) && git checkout $(BRANCH )
4040
4141
@@ -104,3 +104,7 @@ update_txconfig:
104104.PHONY : fuzzy
105105fuzzy :
106106for file in * .po * /* .po; do echo $$ (msgattrib --only-fuzzy --no-obsolete " $$ file" | grep -c ' #, fuzzy' ) $$ file; done | grep -v ^0 | sort -gr
107+
108+ .PHONY : rm_cpython
109+ rm_cpython :
110+ rm -rf $(CPYTHON_CLONE )
You can’t perform that action at this time.
0 commit comments