Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed debian files or cpack_rpm.cmake should trigger save_packages #453

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ for w_name in master_config["workers"]:

####### FACTORY CODE

f_quick_build = getQuickBuildFactory('nm', mtrDbPool)
f_quick_build = getQuickBuildFactory("nm", mtrDbPool)
f_rpm_autobake = getRpmAutobakeFactory(mtrDbPool)

## f_deb_autobake
Expand Down Expand Up @@ -384,6 +384,22 @@ for builder in master_config["builders"]:
)
)


def file_change_hook(change):
changed_files = change.files
properties = {}
for file_path in changed_files:
if fnmatch.fnmatch(file, "debian/*"):
properties["debian_changes"] = True
if fnmatch.fnmatch(file, "cmake/cpack_rpm.cmake"):
properties["debian_changes"] = True
if properties:
properties["save_packages"] = True
return properties


c["change_hooks"] = [file_change_hook]

c["logEncoding"] = "utf-8"

c["multiMaster"] = True
Expand Down
Loading