add changelog.sh to help the redactor of niteration
authorJean Privat <jean@pryen.org>
Sat, 13 Dec 2014 01:45:29 +0000 (20:45 -0500)
committerJean Privat <jean@pryen.org>
Sat, 13 Dec 2014 01:45:29 +0000 (20:45 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/changelog.sh [new file with mode: 0755]

diff --git a/src/changelog.sh b/src/changelog.sh
new file mode 100755 (executable)
index 0000000..754f545
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/bash
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This shell script is used to generate stats for the next niteration (news letter)
+
+orig_def=`git describe --abbrev=0`
+cur_def=origin/master
+
+orig=${1-$orig_def}
+cur=${2-$cur_def}
+
+echo "changelog: ${orig} .. ${cur}"
+echo "shortstat"
+git diff --shortstat "$orig".."$cur"
+echo "PR"
+git log --first-parent "$orig".."$cur" | grep 'Pull-Request: #' | wc -l
+echo "shortlog"
+git shortlog -ens "$orig".."$cur"
+echo log
+echo
+git log --format="* %s [[!commit %h]]" --first-parent "$orig".."$cur" | tac