We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b1db95 commit fc2bcc4Copy full SHA for fc2bcc4
hooks/pre-push
@@ -1,7 +1,8 @@
1
#!/bin/sh
2
3
if [ "$(git branch --show-current)" = master ]; then
4
- VERSION="v$(grep -oP '^__version__ = "\K\d(\.\d){2}' cmake-init/__main__.py)"
+ MAIN=cmake-init/__main__.py
5
+ VERSION="v$(grep -oP '^__version__ = "\K\d(\.\d+){2}' "${MAIN}")"
6
if [ -n "$(git ls-remote --tags origin "${VERSION}")" ]; then
7
echo "${VERSION} already exists remotely, bump the version" >&2
8
exit 1
0 commit comments