From 80d914df84725e44e8446213c57e8891ed5d0152 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 19 Apr 2021 09:13:06 -0400 Subject: [PATCH 1/2] Add beforeCommitChangelog hook for updating datalad_crawler/version.py --- .autorc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.autorc b/.autorc index bc91179..c4db80a 100644 --- a/.autorc +++ b/.autorc @@ -3,5 +3,13 @@ "baseBranch": "master", "author": "auto ", "noVersionPrefix": true, - "plugins": ["git-tag"] + "plugins": [ + "git-tag", + [ + "exec", + { + "beforeCommitChangelog": "awk 'NR==1 {print \"__version__ = \\\"\" $2 \"\\\"\"}' CHANGELOG.md > datalad_crawler/version.py && git add datalad_crawler/version.py" + } + ] + ] } From 3806cb2f0b06b43da1a1e29f99d0ed265062b649 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Mon, 19 Apr 2021 11:08:59 -0400 Subject: [PATCH 2/2] Get package name from setup.py --- .autorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.autorc b/.autorc index c4db80a..862a19e 100644 --- a/.autorc +++ b/.autorc @@ -8,7 +8,7 @@ [ "exec", { - "beforeCommitChangelog": "awk 'NR==1 {print \"__version__ = \\\"\" $2 \"\\\"\"}' CHANGELOG.md > datalad_crawler/version.py && git add datalad_crawler/version.py" + "beforeCommitChangelog": "awk 'NR==1 {print \"__version__ = \\\"\" $2 \"\\\"\"}' CHANGELOG.md > \"$(python setup.py --name)\"/version.py && git add \"$(python setup.py --name)\"/version.py" } ] ]