Skip to content

Commit

Permalink
"make dist" updates the ChangeLogs automatically.
Browse files Browse the repository at this point in the history
When creating a distribution "make dist" now uses the
commits-to-changelog script to automatically update all
ChangeLog files since the last commit marked with the
"last-commit-with-compulsory-changelog-entry" tag.
  • Loading branch information
schani committed Jul 29, 2010
1 parent 6033d1d commit 89bc1e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Expand Up @@ -25,6 +25,7 @@ DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false

# Distribute the 'mcs' tree too
dist-hook:
./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive

Expand Down
5 changes: 5 additions & 0 deletions scripts/commits-to-changelog.py
Expand Up @@ -228,11 +228,16 @@ def append_lines (file, lines):
def main ():
usage = "usage: %prog [options] <start-commit>"
parser = OptionParser (usage)
parser.add_option ("-r", "--root", dest = "root", help = "Root directory of the working tree to be changed")
(options, args) = parser.parse_args ()
if len (args) != 1:
parser.error ("incorrect number of arguments")
start_commit = args [0]

if options.root:
global path_to_root
path_to_root = options.root + "/"

for filename in git ("ls-tree", "-r", "--name-only", "HEAD").splitlines ():
if re.search ("(^|/)Change[Ll]og$", filename):
(path, name) = os.path.split (filename)
Expand Down

0 comments on commit 89bc1e2

Please sign in to comment.