Skip to content

Commit 6c257e3

Browse files
committed
ci: show diff after powrap
1 parent 96f7d3b commit 6c257e3

File tree

2 files changed

+65
-50
lines changed

2 files changed

+65
-50
lines changed

.github/workflows/merge.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Merge translations
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
7+
env:
8+
CPYTHON_BRANCH: '3.14'
9+
LANGUAGE: 'ja'
10+
11+
jobs:
12+
merge:
13+
# Merge translations previously updated into older branches to make sure
14+
# older versions of Python Docs gets translated as well.
15+
name: merge into ${{ matrix.branch }}
16+
needs: [update]
17+
strategy:
18+
matrix:
19+
branch: [ "3.13", "3.12", "3.11" ]
20+
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check out source branch (${{ env.CPYTHON_BRANCH }})
24+
uses: actions/checkout@v4
25+
with:
26+
path: ${{ env.CPYTHON_BRANCH }}
27+
28+
- name: Check out target branch (${{ matrix.branch }})
29+
uses: actions/checkout@v4
30+
with:
31+
ref: ${{ matrix.branch }}
32+
path: ${{ matrix.branch }}
33+
34+
- name: Set up Python
35+
uses: actions/setup-python@v5
36+
with:
37+
cache: 'pip'
38+
cache-dependency-path: '**/requirements*.txt'
39+
40+
- name: Install dependencies
41+
run: |
42+
sudo apt-get update -y && sudo apt-get install gettext -y
43+
pip install pomerge powrap
44+
45+
- name: Merge overwriting on stable release branch
46+
run: |
47+
pomerge --from "${{ env.CPYTHON_BRANCH }}"/**/*.po --to "${{ matrix.branch }}"/**/*.po
48+
49+
- name: Wrap catalog message files
50+
run: |
51+
powrap --modified -C "${{ matrix.branch }}"
52+
git diff
53+
54+
- name: Commit and push changes
55+
if: github.repository == 'python/python-docs-ja'
56+
run: |
57+
cd "${{ matrix.branch }}"
58+
git config user.name github-actions
59+
git config user.email github-actions@github.com
60+
git status
61+
git add -A
62+
git diff-index --quiet HEAD || ( git commit -m "Merge ${{ env.CPYTHON_BRANCH }} into ${{ matrix.branch }}" && git push )
63+

.github/workflows/update.yml

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
- name: Wrap catalog message files
5454
run: |
5555
powrap --modified
56+
git diff
5657
- name: Commit and push changes
5758
if: github.repository == 'python/python-docs-ja'
5859
run: |
@@ -63,53 +64,4 @@ jobs:
6364
git diff-index --quiet HEAD || ( git commit -m "Update translations from Transifex" && git push )
6465
6566
merge:
66-
# Merge translations previously updated into older branches to make sure
67-
# older versions of Python Docs gets translated as well.
68-
name: merge into ${{ matrix.branch }}
69-
needs: [update]
70-
strategy:
71-
matrix:
72-
branch: [ "3.13", "3.12", "3.11" ]
73-
74-
runs-on: ubuntu-latest
75-
steps:
76-
- name: Check out source branch (${{ env.CPYTHON_BRANCH }})
77-
uses: actions/checkout@v4
78-
with:
79-
path: ${{ env.CPYTHON_BRANCH }}
80-
81-
- name: Check out target branch (${{ matrix.branch }})
82-
uses: actions/checkout@v4
83-
with:
84-
ref: ${{ matrix.branch }}
85-
path: ${{ matrix.branch }}
86-
87-
- name: Set up Python
88-
uses: actions/setup-python@v5
89-
with:
90-
cache: 'pip'
91-
cache-dependency-path: '**/requirements*.txt'
92-
93-
- name: Install dependencies
94-
run: |
95-
sudo apt-get update -y && sudo apt-get install gettext -y
96-
pip install pomerge powrap
97-
98-
- name: Merge overwriting on stable release branch
99-
run: |
100-
pomerge --from "${{ env.CPYTHON_BRANCH }}"/**/*.po --to "${{ matrix.branch }}"/**/*.po
101-
102-
- name: Wrap catalog message files
103-
run: |
104-
powrap --modified -C "${{ matrix.branch }}"
105-
106-
- name: Commit and push changes
107-
if: github.repository == 'python/python-docs-ja'
108-
run: |
109-
cd "${{ matrix.branch }}"
110-
git config user.name github-actions
111-
git config user.email github-actions@github.com
112-
git status
113-
git add -A
114-
git diff-index --quiet HEAD || ( git commit -m "Merge ${{ env.CPYTHON_BRANCH }} into ${{ matrix.branch }}" && git push )
115-
67+
uses: ./.github/workflows/merge.yml

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy