Skip to content

Commit 6e1330b

Browse files
authored
Merge branch 'master' into updateDocsDeegree360pre2-407
2 parents df99d25 + 64c8e77 commit 6e1330b

File tree

2,422 files changed

+315015
-64970
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,422 files changed

+315015
-64970
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/scripts/update_locale.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
# ------------------------------------------------------------------------------
3+
# pgRouting Scripts
4+
# Copyright(c) pgRouting Contributors
5+
#
6+
# Update the locale files
7+
# ------------------------------------------------------------------------------
8+
9+
10+
11+
DIR=$(git rev-parse --show-toplevel)
12+
13+
pushd "${DIR}" > /dev/null || exit 1
14+
15+
pushd build > /dev/null || exit 1
16+
cmake -DLOCALE=ON ..
17+
18+
make locale
19+
popd > /dev/null || exit 1
20+
21+
# List all the files that needs to be committed in build/doc/locale_changes.txt
22+
awk '/^Update|^Create/{print $2}' build/doc/locale_changes.txt > build/doc/locale_changes_po.txt # .po files
23+
cp build/doc/locale_changes_po.txt build/doc/locale_changes_po_pot.txt
24+
perl -pe 's/(.*)en\/LC_MESSAGES(.*)/$1pot$2t/' < build/doc/locale_changes_po.txt >> build/doc/locale_changes_po_pot.txt # .pot files
25+
26+
# List all the files that needs to be committed in build/presentation/locale_changes.txt
27+
awk '/^Update|^Create/{print $2}' build/presentation/locale_changes.txt > build/presentation/locale_changes_po.txt # .po files
28+
cp build/presentation/locale_changes_po.txt build/presentation/locale_changes_po_pot.txt
29+
perl -pe 's/(.*)en\/LC_MESSAGES(.*)/$1pot$2t/' < build/presentation/locale_changes_po.txt >> build/presentation/locale_changes_po_pot.txt # .pot files
30+
31+
# Remove obsolete entries #~ from .po files
32+
bash scripts/remove_obsolete_entries.sh
33+
34+
# Remove duplicate string locations
35+
perl -i -ne 'print unless (defined($prev) && ($_ eq $prev)); $prev=$_' locale/pot/*.pot
36+
37+
while read -r f; do git add "$f"; done < build/doc/locale_changes_po_pot.txt
38+
while read -r f; do git add "$f"; done < build/presentation/locale_changes_po_pot.txt
39+
40+
popd > /dev/null || exit 1

.github/workflows/deploy-pages.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ on:
1313

1414
jobs:
1515
deploy:
16-
runs-on: ubuntu-18.04
16+
runs-on: ubuntu-22.04
1717
if: ${{ github.repository_owner == 'OSGeo' }}
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121

2222
- name: Install apt packages
2323
run: |
2424
sudo apt-get install cmake cpanminus
2525
sudo cpanm Text::SimpleTable::AutoWidth
2626
2727
- name: Setup Python
28-
uses: actions/setup-python@v2
28+
uses: actions/setup-python@v5
2929
with:
3030
python-version: '3.x'
3131

@@ -44,23 +44,9 @@ jobs:
4444
mkdir -p build
4545
bash ci/build-pages.sh
4646
47-
- name: Update locale
48-
if: github.ref == 'refs/heads/master'
49-
run: |
50-
mkdir -p build
51-
bash tools/transifex/update_locale.sh
52-
53-
# Add the files, commit and push
54-
for line in `cat build/doc/locale_changes_po_pot.txt`; do git add "$line"; done
55-
git diff --staged --quiet || git commit -m "Update locale: commit ${{ env.GIT_HASH }}"
56-
git fetch origin master
57-
git restore . # Remove the unstaged changes before rebasing
58-
git rebase origin/master
59-
git push origin master
60-
6147
- name: Deploy pages
6248
if: github.ref == 'refs/heads/master'
63-
uses: peaceiris/actions-gh-pages@v3
49+
uses: peaceiris/actions-gh-pages@v4
6450
with:
6551
github_token: ${{ secrets.GITHUB_TOKEN }}
6652
publish_dir: build/_build/html

.github/workflows/linkcheck.yml

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
1-
name: Check Documentation Links
1+
name: Check Documentation Links
22

3-
on: [push,pull_request]
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/linkcheck.yml'
7+
- 'doc/**'
8+
- 'locale/**'
9+
- 'CMakeLists.txt'
410

11+
branches-ignore:
12+
- 'gh-pages'
13+
14+
pull_request:
15+
paths:
16+
- '.github/workflows/doc-check.yml'
17+
- 'doc/**'
18+
- 'locale/**'
19+
- 'CMakeLists.txt'
20+
21+
branches-ignore:
22+
- 'gh-pages'
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
permissions:
29+
contents: read
530

631

732
jobs:
@@ -12,50 +37,57 @@ jobs:
1237
strategy:
1338
fail-fast: false
1439
matrix:
15-
language: [de,en,es,fi,fr,hu,ja,it]
40+
language: [de,en,es,fi,fr,hu,ja,it,nl,pt,sv,tr,zh_Hans]
1641

1742
steps:
18-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v4
1944
with:
2045
fetch-depth: 2
2146

22-
- name: get commit message
47+
- name: check modified files
48+
id: check_files
2349
run: |
24-
PROCESS=${{ false }}
25-
if [[ $(git log --format=%B -n 2 | tr -d "'" | tr -d " " | grep "\[${{ matrix.language }}\]") ]]; then
26-
PROCESS=${{ true }}
27-
fi
28-
if [[ "${{ matrix.language }}" == "en" ]]; then
29-
PROCESS=${{ true }}
30-
fi
31-
echo "PROCESS=${PROCESS}" >> $GITHUB_ENV
32-
50+
# allways processing english, no matter what the change was
51+
if [[ "${{ matrix.language }}" == "en" ]]; then echo "PROCESS=true" >> $GITHUB_ENV; fi
52+
53+
# if there is a change on the translation
54+
if git diff --name-only HEAD^ HEAD | grep -q "^locale/${{ matrix.language }}" ; then echo "PROCESS=true" >> $GITHUB_ENV; fi
55+
# if the change involves a link
56+
if git diff HEAD^ "locale/${{ matrix.language }}" | grep "http" | grep -q "+" ; then echo "CHK_LINK=true" >> $GITHUB_ENV; fi
57+
3358
- name: Install python
34-
if: env.PROCESS == 'true'
35-
uses: actions/setup-python@v2
59+
if: env.PROCESS == 'true' || env.CHK_LINK == 'true'
60+
uses: actions/setup-python@v5
3661
with:
3762
python-version: '3.x'
3863

3964

4065
- name: Install dependencies
41-
if: env.PROCESS == 'true'
66+
if: env.PROCESS == 'true' || env.CHK_LINK == 'true'
4267
run: |
4368
sudo apt-get update
4469
sudo apt-get install -y \
45-
graphviz
46-
python -m pip install --upgrade pip
70+
graphviz cmake cpanminus
71+
sudo cpanm Text::SimpleTable::AutoWidth
4772
pip install -r requirements.txt
4873
pip list
4974
5075
- name: Configure link checks
51-
if: env.PROCESS == 'true'
76+
if: env.PROCESS == 'true' || env.CHK_LINK == 'true'
5277
run: |
5378
mkdir build
5479
cd build
55-
cmake -DLINKCHECK=ON -DDE=ON -DES=ON -DFI=ON -DFR=ON -DHU=ON -DJA=ON -DIT=ON ..
80+
cmake -DHTML=ON -DLINKCHECK=ON -DDE=ON -DES=ON -DFI=ON -DFR=ON -DHU=ON -DJA=ON -DIT=ON -DPT=ON -DSV=ON -DTR=ON -DNL=ON -DZH_HANS=ON ..
5681
57-
- name: Check Links languages
82+
- name: test documentation
5883
if: env.PROCESS == 'true'
84+
run: |
85+
cd build
86+
make html-${{ matrix.language }}
87+
make presentation-html-${{ matrix.language }}
88+
89+
- name: Check Links languages
90+
if: env.CHK_LINK == 'true'
5991
run: |
6092
cd build
6193
make linkcheck-${{ matrix.language }}

.github/workflows/locale-update.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Update Locale
2+
3+
# This action runs:
4+
# - When this file changes
5+
# - When changes on documentation (doc)
6+
# - When is triggered manually
7+
8+
on:
9+
workflow_dispatch:
10+
push:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
update-locale:
17+
permissions:
18+
contents: write # for Git to git push
19+
name: Update Locale
20+
runs-on: ubuntu-22.04
21+
22+
strategy:
23+
fail-fast: false
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 1
30+
31+
- name: Install apt packages
32+
run: |
33+
sudo apt-get install cmake cpanminus
34+
sudo cpanm Text::SimpleTable::AutoWidth
35+
36+
- name: Setup Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.x'
40+
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
python -m pip install -r ./requirements.txt
45+
46+
- name: Extract branch name and commit hash
47+
run: |
48+
branch=${GITHUB_REF#refs/heads/}
49+
git_hash=$(git rev-parse --short "$GITHUB_SHA")
50+
echo "GIT_HASH=$git_hash" >> $GITHUB_ENV
51+
52+
- name: Initialize mandatory git config
53+
run: |
54+
git config user.name "github-actions[bot]"
55+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
56+
57+
- name: Update locale
58+
run: |
59+
mkdir build
60+
bash .github/scripts/update_locale.sh
61+
62+
# Add the files, commit and push
63+
git diff --staged --quiet || git commit -m "Locale update: for commit ${{ env.GIT_HASH }}"
64+
git restore . # Remove the unstaged changes before rebasing
65+
git push

0 commit comments

Comments
 (0)