Explorar o código

added script for creating release notes

Bulat Yusupov %!s(int64=5) %!d(string=hai) anos
pai
achega
3c100b009c
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      release_json.sh

+ 13 - 0
release_json.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+last_tag=$(git describe --tags --abbrev=0)
+
+if [ -z "$last_tag" ]; then
+    last_tag="HEAD"
+else
+    last_tag="$last_tag..HEAD"
+fi
+
+commits_list=$(git --no-pager log $last_tag --oneline --pretty=format:"- %s\\n" | tr -d '\n' | sed 's/\"/\\"/g')
+
+echo '{"tag_name":"'$1'","body":"'$commits_list'"}' > /tmp/release_json