File tree 4 files changed +106
-4
lines changed
4 files changed +106
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : build
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - " 3.7"
7
+ - " 3.8"
8
+ - " 3.9"
9
+
10
+ jobs :
11
+ ci :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+
16
+ - name : Install Dependencies
17
+ run : sudo apt-get install gettext
18
+
19
+ - name : Build
20
+ run : VERSION=${{ github.event.pull_request.base.ref }} make
Original file line number Diff line number Diff line change
1
+ name : deploy-gh-page
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " 3.9"
7
+
8
+ jobs :
9
+ cd :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v2
13
+
14
+ - name : Install Dependencies
15
+ run : sudo apt-get install gettext
16
+
17
+ - name : Build
18
+ run : make
19
+
20
+ - name : Deploy to gh page
21
+ uses : JamesIves/github-pages-deploy-action@3.7.1
22
+ with :
23
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24
+ BRANCH : gh-pages
25
+ FOLDER : ../cpython/Doc/build/html
26
+ CLEAN : true
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 @@ -22,20 +22,20 @@ LC_MESSAGES := $(CPYTHON_CLONE)/Doc/locales/$(LANGUAGE)/LC_MESSAGES
22
22
VENV := ~/.venvs/python-docs-i18n/
23
23
PYTHON := $(shell which python3)
24
24
MODE := autobuild-dev-html
25
- BRANCH = $(shell git describe --contains --all HEAD)
25
+ BRANCH : = $(or $( VERSION ) , $( shell git describe --contains --all HEAD) )
26
26
JOBS = 1
27
27
28
28
29
29
.PHONY : all
30
- all : $(VENV ) /bin/sphinx-build $(VENV ) /bin/blurb $( SPHINX_CONF )
30
+ all : $(VENV ) /bin/sphinx-build $(VENV ) /bin/blurb clone
31
31
mkdir -p $(LC_MESSAGES )
32
32
for dirname in $$ (find . -name ' *.po' | xargs -n1 dirname | sort -u | grep -v ' ^\.$$' ); do mkdir -p $( LC_MESSAGES) /$$ dirname; done
33
33
for file in * .po * /* .po; do ln -f $$ file $( LC_MESSAGES) /$$ file; done
34
34
. $(VENV ) /bin/activate; $(MAKE ) -C $(CPYTHON_CLONE ) /Doc/ SPHINXOPTS=' -j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE )
35
35
36
36
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 "
39
39
cd $(CPYTHON_CLONE ) && git checkout $(BRANCH )
40
40
41
41
@@ -104,3 +104,7 @@ update_txconfig:
104
104
.PHONY : fuzzy
105
105
fuzzy :
106
106
for 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