Skip to content

Commit 55a92ee

Browse files
committed
chore(ci): add git tree check to bump
1 parent 3a6f691 commit 55a92ee

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/workflows/golangcli-lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
name: golangci-lint
1+
name: GolangCI
2+
23
on:
34
push:
45
branches:
56
- main
6-
- master
77
pull_request:
88

99
permissions:
1010
contents: read
1111
pull-requests: read
1212

1313
jobs:
14-
golangci:
15-
name: lint
14+
lint:
15+
name: GolangCI - Lint
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ http-fmt:
3737

3838
bump:
3939
pnpm bump
40+

cli/bump.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
if ! git diff-index --quiet HEAD -- || [ -n "$(git ls-files --others --exclude-standard)" ]; then
2+
echo "Working directory is not clean. Commit or stash your changes first."
3+
exit 2
4+
else
5+
echo "Working directory is clean."
6+
fi
7+
8+
19
node cli/semver.mjs
210

311
VERSION=$(node -p "require('./package.json').version")
@@ -8,3 +16,5 @@ git add package.json
816
git commit -m "chore(ci): bump version v$VERSION"
917

1018
git push origin "v$VERSION"
19+
20+
exit 0

0 commit comments

Comments
 (0)