]> git.phdru.name Git - cookiecutter.git/commitdiff
Make tag-with-version alias
authorOleg Broytman <phd@phdru.name>
Tue, 2 Aug 2016 16:22:01 +0000 (19:22 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 2 Aug 2016 16:22:01 +0000 (19:22 +0300)
project_template/mk-tag-alias [new file with mode: 0755]
project_template/tag.vim [new file with mode: 0644]

diff --git a/project_template/mk-tag-alias b/project_template/mk-tag-alias
new file mode 100755 (executable)
index 0000000..658fdbc
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+exec git config --local alias.tag-with-version \
+   "!GIT_EDITOR='vim -c \"source tag.vim\"' \
+   exec git tag -s \`python setup.py --version\`"
diff --git a/project_template/tag.vim b/project_template/tag.vim
new file mode 100644 (file)
index 0000000..27d311b
--- /dev/null
@@ -0,0 +1,9 @@
+set fileencoding=utf-8
+edit ChangeLog
+normal 1G3yy
+buffer 1
+normal 1GPf ;Da:
+.
+normal JJjdd
+s/\.$//
+update