Skip to content

Commit

Permalink
Makefile: pack only select locales for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
amezin committed Oct 10, 2023
1 parent e989d60 commit 0d91c0a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
run: echo "::add-matcher::.github/problem-matchers/generic.json"

- name: Build extension package
run: xvfb-run make pack
run: xvfb-run make ONLY_RELEASE_LOCALES=true pack

- name: Upload extension package as artifact
id: upload
Expand Down
22 changes: 21 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,27 @@ schemas: $(SCHEMAS_COMPILED)

# Locales

LOCALES := $(wildcard po/*.po)
LOCALES_RELEASE := \
po/cs.po \
po/de.po \
po/el.po \
po/fr.po \
po/nb_NO.po \
po/pl.po \
po/pt.po \
po/ru.po \
po/zh_CN.po

LOCALES_ALL := $(wildcard po/*.po)

ONLY_RELEASE_LOCALES := no

ifeq ($(call is-true,$(ONLY_RELEASE_LOCALES)),1)
LOCALES := $(LOCALES_RELEASE)
else
LOCALES := $(LOCALES_ALL)
endif

LOCALE_SOURCE_PATTERN := po/%.po
LOCALE_COMPILED_PATTERN := locale/%/LC_MESSAGES/$(EXTENSION_UUID).mo
LOCALES_COMPILED := $(patsubst $(LOCALE_SOURCE_PATTERN),$(LOCALE_COMPILED_PATTERN),$(LOCALES))
Expand Down

0 comments on commit 0d91c0a

Please sign in to comment.