Skip to content

Commit 7700126

Browse files
authored
Merge pull request #9531 from keymanapp/chore/linux/9518_build-twice
chore(linux): Add `clean` target to `rules`
2 parents 35d786b + aaef0f3 commit 7700126

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

linux/debian/rules

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,11 @@ override_dh_auto_install:
7373

7474
override_dh_missing:
7575
dh_missing --fail-missing
76+
77+
override_dh_auto_clean:
78+
core/build.sh clean
79+
linux/ibus-keyman/build.sh clean
80+
linux/keyman-system-service/build.sh clean
81+
linux/keyman-config/build.sh clean
82+
rm -rf .pybuild/
83+
dh_auto_clean $@

linux/keyman-config/build.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,17 @@ builder_describe_outputs \
2626
build "/linux/keyman-config/keyman_config/standards/lang_tags_map.py"
2727

2828
clean_action() {
29-
rm -rf dist make_deb build keyman_config/version.py ./*.egg-info __pycache__ \
30-
keyman_config/standards/lang_tags_map.py
29+
rm -rf dist make_deb build ./*.egg-info keyman_config/version.py
30+
find . \( -name __pycache__ -o -name keyman-config.mo \) -exec rm -rf {} +
31+
rm -rf ../help/reference/km-*.md
32+
33+
# Don't delete this file during a package build because they are
34+
# part of the source package. We can't generate it during a package
35+
# build because we need to get data from the network which isn't
36+
# available for package builds.
37+
if [ -z "${KEYMAN_PKG_BUILD-}" ]; then
38+
rm -rf keyman_config/standards/lang_tags_map.py
39+
fi
3140
}
3241

3342
execute_with_temp_schema() {

linux/scripts/dist.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ dpkg-source --tar-ignore=*~ --tar-ignore=.git --tar-ignore=.gitattributes \
4848
\
4949
--tar-ignore=core/build \
5050
--tar-ignore=developer --tar-ignore=docs --tar-ignore=ios \
51+
--tar-ignore=linux/keyman-config/keyman_config/version.py \
5152
--tar-ignore=linux/keyman-config/buildtools/build-langtags.py --tar-ignore=__pycache__ \
5253
--tar-ignore=linux/help \
5354
--tar-ignore=mac --tar-ignore=node_modules --tar-ignore=oem \

0 commit comments

Comments
 (0)