Trying to trick github CI for po4a version.

This commit is contained in:
John Livingston 2023-07-17 16:33:44 +02:00
parent 0b32c9bb31
commit d8d1de3ceb
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
3 changed files with 10 additions and 4 deletions

View File

@ -15,8 +15,14 @@ jobs:
submodules: true # Fetch Hugo themes (true OR recursive) submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Install po4a # FIXME: ubuntu-22.04 comes with po4a 0.66.
run: sudo apt update && sudo apt install po4a -y # We need at least v0.69.
# Github does not provide any other suitable image...
# So... we will trick it by downloading the debian package.
# - name: Install po4a
# run: sudo apt update && sudo apt install po4a -y
- name: Install po4a from debian bookworm version
run: wget http://ftp.debian.org/debian/pool/main/p/po4a/po4a_0.69-1_all.deb && dpkg -i po4a_0.69-1_all.deb
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2

View File

@ -8,7 +8,7 @@ ignore_pattern='^#*\s*\{\{%\s*livechat_label[^\}]+\s*\}\}\s*$'
# Is po4a new enough? # Is po4a new enough?
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
required_version='0.66' required_version='0.69'
current_version=$(po4a --version | sed -En 's,po4a version ([0-9][0-9.]+[0-9]).*,\1,p') current_version=$(po4a --version | sed -En 's,po4a version ([0-9][0-9.]+[0-9]).*,\1,p')
if version_gt "$required_version" "$current_version"; then if version_gt "$required_version" "$current_version"; then
echo "ERROR: po4a v$required_version or higher required. Current version: $current_version" echo "ERROR: po4a v$required_version or higher required. Current version: $current_version"

View File

@ -54,7 +54,7 @@ This page will automatically refresh on each modification.
For now, you only have the english version. For now, you only have the english version.
To update documentation strings, and generate translations, you have to run the `doc-translate.sh` script. To update documentation strings, and generate translations, you have to run the `doc-translate.sh` script.
To do so, make sure you have `po4a` (version >= 0.66) installed on your computer. To do so, make sure you have `po4a` (version >= 0.69) installed on your computer.
{{% notice warning %}} {{% notice warning %}}
Some linux distro (like Debian Bullseye for example) have too old version of `po4a`. Some linux distro (like Debian Bullseye for example) have too old version of `po4a`.