mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
build(fix): fail release command by default if make po failed
This commit is contained in:
19
Makefile
19
Makefile
@@ -41,11 +41,6 @@ WIN32_DIR=$(PLATFORM_DIR)/win32
|
||||
INSTALL_FILES=reader.lua setupkoenv.lua frontend resources defaults.lua datastorage.lua \
|
||||
l10n tools README.md COPYING
|
||||
|
||||
# for gettext
|
||||
DOMAIN=koreader
|
||||
TEMPLATE_DIR=l10n/templates
|
||||
KOREADER_MISC_TOOL=../koreader-misc
|
||||
XGETTEXT_BIN=$(KOREADER_MISC_TOOL)/gettext/lua_xgettext.py
|
||||
|
||||
|
||||
all: $(if $(ANDROID),,$(KOR_BASE)/$(OUTPUT_DIR)/luajit)
|
||||
@@ -348,6 +343,13 @@ android-toolchain:
|
||||
pocketbook-toolchain:
|
||||
$(MAKE) -C $(KOR_BASE) pocketbook-toolchain
|
||||
|
||||
|
||||
# for gettext
|
||||
DOMAIN=koreader
|
||||
TEMPLATE_DIR=l10n/templates
|
||||
KOREADER_MISC_TOOL=../koreader-misc
|
||||
XGETTEXT_BIN=$(KOREADER_MISC_TOOL)/gettext/lua_xgettext.py
|
||||
|
||||
pot:
|
||||
mkdir -p $(TEMPLATE_DIR)
|
||||
$(XGETTEXT_BIN) reader.lua `find frontend -iname "*.lua"` \
|
||||
@@ -355,10 +357,13 @@ pot:
|
||||
`find tools -iname "*.lua"` \
|
||||
> $(TEMPLATE_DIR)/$(DOMAIN).pot
|
||||
# push source file to Transifex
|
||||
$(MAKE) -i -C l10n bootstrap push
|
||||
$(MAKE) -i -C l10n bootstrap
|
||||
$(MAKE) -C l10n push
|
||||
|
||||
po:
|
||||
$(MAKE) -i -C l10n bootstrap pull
|
||||
$(MAKE) -i -C l10n bootstrap
|
||||
$(MAKE) -C l10n pull
|
||||
|
||||
|
||||
static-check:
|
||||
@if which luacheck > /dev/null; then \
|
||||
|
||||
23
kodev
23
kodev
@@ -178,7 +178,11 @@ function kodev-release() {
|
||||
# SUPPORTED_RELEASE_TARGETS=$(echo ${SUPPORTED_TARGETS} | sed 's/win32//')
|
||||
SUPPORTED_RELEASE_TARGETS="${SUPPORTED_TARGETS/emu*/""}"
|
||||
RELEASE_HELP_MSG="
|
||||
usage: release <TARGET>
|
||||
usage: release <OPTIONS> <TARGET>
|
||||
|
||||
OPTIONS:
|
||||
|
||||
--ignore-translation do not fetch translation for release
|
||||
|
||||
TARGET:
|
||||
${SUPPORTED_RELEASE_TARGETS}"
|
||||
@@ -187,10 +191,15 @@ ${SUPPORTED_RELEASE_TARGETS}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
ignore_translation=0
|
||||
|
||||
while [[ $1 == '-'* ]]; do
|
||||
PARAM=$(echo "$1" | awk -F= '{print $1}')
|
||||
VALUE=$(echo "$1" | awk -F= '{print $2}')
|
||||
case $PARAM in
|
||||
--ignore-translation)
|
||||
ignore_translation=1
|
||||
;;
|
||||
-v | --verbose)
|
||||
export VERBOSE=1
|
||||
;;
|
||||
@@ -207,7 +216,17 @@ ${SUPPORTED_RELEASE_TARGETS}"
|
||||
shift 1
|
||||
done
|
||||
|
||||
which tx>/dev/null && make po || echo "WARN: Transifex client not found, no translation pulled."
|
||||
if [ "${ignore_translation}" -eq 0 ]; then
|
||||
if which tx>/dev/null; then
|
||||
make po || {
|
||||
echo "ERROR: failed to fetch translation."
|
||||
echo "Tip: Use --ignore-translation OPTION if you want to build a release without translation."
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
echo "WARN: Transifex client not found, no translation pulled."
|
||||
fi
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
kindle)
|
||||
|
||||
Reference in New Issue
Block a user