We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 178655a commit cfec37cCopy full SHA for cfec37c
release.sh
@@ -12,14 +12,14 @@ if ! command -v gh > /dev/null; then
12
fi
13
14
# Use version from changelog
15
-# version=$(head -n1 CHANGELOG.md|cut -d"v" -f2);
16
-version=$1
+version=$(grep '^## \[' CHANGELOG.md|head -n1|cut -d'[' -f2|cut -d']' -f1);
+# version=$1
17
# The target branch, defaults to the current branch
18
target=${2:-$(git branch --show-current)}
19
# The tag
20
tag=v$version
21
22
-if ! [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+if ! [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?$ ]]; then
23
echo "Invalid version, please enter a valid semantic version"
24
exit 1
25
0 commit comments