Skip to content

Commit 35ab229

Browse files
committed
Add release.sh
1 parent 1694402 commit 35ab229

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.clog.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[clog]
2+
repository = "https://github.com/gluon-lang/lsp-types"
3+
4+
changelog = "CHANGELOG.md"
5+
6+
from-latest-tag = true

release.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
set -ex
3+
4+
LEVEL=$1
5+
VERSION=$2
6+
if [ -z "$LEVEL" ]; then
7+
echo "Expected patch, minor or major"
8+
exit 1
9+
fi
10+
11+
clog --$LEVEL
12+
if [ -z $(head -1 CHANGELOG.md | grep $VERSION) ]; then
13+
git checkout CHANGELOG.md
14+
echo "Wrong version specified"
15+
exit 1
16+
fi
17+
18+
git add CHANGELOG.md
19+
git commit -m "Update changelog"
20+
21+
cargo release $VERSION

0 commit comments

Comments
 (0)