Add xgettext-go build step #620
17
.drone.yml
17
.drone.yml
@ -7,6 +7,23 @@ steps:
|
||||
commands:
|
||||
- make check
|
||||
|
||||
- name: xgettext-go
|
||||
image: git.coopcloud.tech/toolshed/drone-xgettext-go:latest
|
||||
settings:
|
||||
keyword: i18n.G
|
||||
out: pkg/i18n/locales/abra.pot
|
||||
depends_on:
|
||||
- make check
|
||||
|
||||
- name: xgettext-go status
|
||||
image: golang:1.24-alpine3.22
|
||||
commands:
|
||||
- apk add patchutils git make
|
||||
- cd /drone/src
|
||||
- make update-pot-po-metadata check-pot-changes
|
||||
depends_on:
|
||||
- xgettext-go
|
||||
|
||||
- name: make test
|
||||
image: golang:1.24
|
||||
environment:
|
||||
|
||||
10
Makefile
10
Makefile
@ -84,7 +84,15 @@ update-pot:
|
||||
|
||||
.PHONY: update-pot-po-metadata
|
||||
update-pot-po-metadata:
|
||||
@sed -i "s/charset=CHARSET/charset=UTF-8/g" pkg/i18n/locales/*.po*
|
||||
@sed -i "s/charset=CHARSET/charset=UTF-8/g" pkg/i18n/locales/*.po pkg/i18n/locales/*.pot*
|
||||
|
||||
.PHONY: check-pot-changes
|
||||
check-pot-changes:
|
||||
@git diff pkg/i18n/locales/abra.pot | grepdiff --output-matching=hunk POT-Creation-Date | git apply --reverse --allow-empty
|
||||
@if ! git diff-files --quiet; then \
|
||||
git diff pkg/i18n/locales/abra.pot; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
.PHONY: build-mo
|
||||
build-mo:
|
||||
|
||||
@ -24,7 +24,7 @@ var AppLabelsCommand = &cobra.Command{
|
||||
Aliases: []string{i18n.G("lb")},
|
||||
Short: i18n.G("Show deployment labels"),
|
||||
Long: i18n.G("Both local recipe and live deployment labels are shown."),
|
||||
Example: i18n.G(" abra app labels 1312.net"),
|
||||
Example: " " + i18n.G("abra app labels 1312.net"),
|
||||
Args: cobra.ExactArgs(1),
|
||||
ValidArgsFunction: func(
|
||||
cmd *cobra.Command,
|
||||
|
||||
Reference in New Issue
Block a user