| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 | |
| 3 """Generates a friendly list of changes per language since the last release.""" | |
| 4 | |
| 5 import sys | |
| 6 import os | |
| 7 | |
| 8 class Language(object): | |
| 9 def __init__(self, name, pathspec): | |
| 10 self.name = name | |
| 11 self.pathspec = pathspec | |
| 12 | |
| 13 languages = [ | |
| 14 Language("C++", [ | |
| 15 "':(glob)src/google/protobuf/*'", | |
| 16 "src/google/protobuf/compiler/cpp", | |
| 17 "src/google/protobuf/io", | |
| 18 "src/google/protobuf/util", | |
| 19 "src/google/protobuf/stubs", | |
| 20 ]), | |
| 21 Language("Java", [ | |
| 22 "java", | |
| 23 "javanano", | |
| 24 "src/google/protobuf/compiler/cpp", | |
| 25 ]), | |
| 26 Language("Python", [ | |
| 27 "javanano", | |
| 28 "src/google/protobuf/compiler/python", | |
| 29 ]), | |
| 30 Language("JavaScript", [ | |
| 31 "js", | |
| 32 "src/google/protobuf/compiler/js", | |
| 33 ]), | |
| 34 Language("PHP", [ | |
| 35 "php", | |
| 36 "src/google/protobuf/compiler/php", | |
| 37 ]), | |
| 38 Language("Ruby", [ | |
| 39 "ruby", | |
| 40 "src/google/protobuf/compiler/ruby", | |
| 41 ]), | |
| 42 Language("Csharp", [ | |
| 43 "csharp", | |
| 44 "src/google/protobuf/compiler/csharp", | |
| 45 ]), | |
| 46 Language("Objective C", [ | |
| 47 "objectivec", | |
| 48 "src/google/protobuf/compiler/objectivec", | |
| 49 ]), | |
| 50 ] | |
| 51 | |
| 52 if len(sys.argv) < 2: | |
| 53 print("Usage: generate_changelog.py <previous release>") | |
| 54 sys.exit(1) | |
| 55 | |
| 56 previous = sys.argv[1] | |
| 57 | |
| 58 for language in languages: | |
| 59 print(language.name) | |
| 60 sys.stdout.flush() | |
| 61 os.system(("git log --pretty=oneline --abbrev-commit %s...HEAD %s | " + | |
| 62 "sed -e 's/^/ - /'") % (previous, " ".join(language.pathspec))) | |
| 63 print("") | |
| 64 | |
| 65 print("To view a commit on GitHub: " + | |
| 66 "https://github.com/google/protobuf/commit/<commit id>") | |
| OLD | NEW |