diff --git a/debian/tools/patchupdate.py b/debian/tools/patchupdate.py index a18c5eab..0be69eae 100755 --- a/debian/tools/patchupdate.py +++ b/debian/tools/patchupdate.py @@ -556,6 +556,9 @@ def generate_ifdefined(all_patches): # Close the file fp.close() + # Add changes to git + subprocess.call(["git", "add", filename]) + # Add the autogenerated file as a last patch patch.files.append(os.path.basename(filename)) for p in patchutils.read_patch(filename): @@ -665,6 +668,9 @@ def generate_makefile(all_patches): fp.write("\ttouch %s.ok\n" % patch.name) fp.write("\n"); + # Add changes to git + subprocess.call(["git", "add", config.path_Makefile]) + def generate_markdown(all_patches, stable_patches, stable_compholio_version): """Generate README.md including information about specific patches and bugfixes.""" @@ -722,6 +728,9 @@ def generate_markdown(all_patches, stable_patches, stable_compholio_version): with open(config.path_README_md, "w") as fp: fp.write(template.format(fixes="\n".join(lines))) + # Add changes to git + subprocess.call(["git", "add", config.path_README_md]) + if __name__ == "__main__": verbose = "-v" in sys.argv[1:] diff --git a/precommit-hook.sh b/precommit-hook.sh index 71d7fea7..72c07867 100755 --- a/precommit-hook.sh +++ b/precommit-hook.sh @@ -7,7 +7,6 @@ git diff --cached --name-status | while read status file; do echo "*** UPDATING AUTOGENERATED FILES ***" echo "" debian/tools/patchupdate.py || exit 1 - git add patches/Makefile README.md || exit 1 break; fi done