Files
drone-xgettext-go/plugin.sh
3wc 7168234604
All checks were successful
continuous-integration/drone/push Build is passing
Sort filenames (predictable order pls)
2025-08-27 12:59:01 -04:00

32 lines
662 B
Bash
Executable File

#!/bin/sh
set -ex
PLUGIN_IN=${PLUGIN_IN:-/drone/src/}
PLUGIN_OUT=${PLUGIN_OUT:-/drone/src/locales/default.pot}
PLUGIN_KEYWORD=${PLUGIN_KEYWORD:-gotext.Get}
run_xgettext_cmd() {
echo "--- start command ---"
cd "$PLUGIN_IN" || exit 1
# shellcheck disable=SC2046 disable=SC2086
xgettext-go \
-o "$PLUGIN_OUT" \
--keyword="$PLUGIN_KEYWORD" \
--sort-output \
${PLUGIN_COMMENTS_TAG:+--add-comments-tag=}${PLUGIN_COMMENTS_TAG}\
$(find . -name "*.go" -not -path '*vendor*' | sort)
echo "--- end command ---"
}
run_plugin() {
echo "--- start drone-xgettext-go ---"
run_xgettext_cmd
echo "--- end drone-xettext-go ---"
}
run_plugin