Merge pull request #63 from bugok/fix_ci_i18n
Fix i18n check option in CI for Hugo versions > 0.93.0
This commit is contained in:
commit
01269cff3b
1 changed files with 7 additions and 1 deletions
8
.github/workflows/ci-test.yml
vendored
8
.github/workflows/ci-test.yml
vendored
|
@ -42,6 +42,7 @@ jobs:
|
||||||
- '0.76.5' # https://github.com/gohugoio/hugo/issues/7822
|
- '0.76.5' # https://github.com/gohugoio/hugo/issues/7822
|
||||||
# - '0.80.0' # https://github.com/gohugoio/hugo/issues/8340
|
# - '0.80.0' # https://github.com/gohugoio/hugo/issues/8340
|
||||||
- '0.86.1' # https://github.com/gohugoio/hugo/issues/9150
|
- '0.86.1' # https://github.com/gohugoio/hugo/issues/9150
|
||||||
|
- '0.93.3' # https://github.com/gohugoio/hugo/commit/837fdfdf45014e3d5ef3b00b01548b68a4489c5f
|
||||||
- 'latest'
|
- 'latest'
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
|
|
||||||
|
@ -57,4 +58,9 @@ jobs:
|
||||||
|
|
||||||
- name: Build with Hugo ${{ matrix.hugo }}
|
- name: Build with Hugo ${{ matrix.hugo }}
|
||||||
working-directory: exampleSite
|
working-directory: exampleSite
|
||||||
run: HUGO_THEME="Binario" hugo --themesDir ../.. --i18n-warnings -v
|
run: |
|
||||||
|
function ver { printf "%03d%03d%03d" $(echo "$1" | tr '.' ' '); }
|
||||||
|
HUGO_VERSION=$(hugo version | grep -Eo '[0-9]\.[0-9]+\.[0-9]+')
|
||||||
|
# The option changed in 0.93.0: https://github.com/gohugoio/hugo/releases/tag/v0.93.0
|
||||||
|
I18N_OPT=$([ $(ver $HUGO_VERSION) -lt $(ver 0.93.0) ] && echo "--i18n-warnings" || echo "--printI18nWarnings")
|
||||||
|
HUGO_THEME="Binario" hugo --themesDir ../.. $I18N_OPT -v
|
||||||
|
|
Loading…
Reference in a new issue