patchupdate.py: Add all autogenerated files to git after creation.

This commit is contained in:
Sebastian Lackner 2014-12-14 06:29:32 +01:00
parent ffd1b6cd6a
commit 152e0e26a9
2 changed files with 9 additions and 1 deletions

View File

@ -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:]

View File

@ -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