Skip to content

Commit 026d2c2

Browse files
Add version task to bump both package.json files
1 parent 199395f commit 026d2c2

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

mise.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ run = "bun run drizzle-kit generate"
7979
description = "Apply migrations"
8080
run = "bun run drizzle-kit migrate"
8181

82+
[tasks.version]
83+
description = "Bump version in both package.json files"
84+
usage = '''
85+
arg "<bump>" help="Version bump type: major, minor, or patch"
86+
'''
87+
run = """
88+
set -e
89+
npm version ${usage_bump} --no-git-tag-version
90+
cd cli && npm version ${usage_bump} --no-git-tag-version
91+
VERSION=$(jq -r .version package.json)
92+
cd ..
93+
echo "Bumped to $VERSION"
94+
echo "Run: git add package.json cli/package.json && git commit -m 'Bump version to $VERSION' && git push"
95+
"""
96+
8297
# CLI tasks
8398
[tasks."cli"]
8499
description = "Run CLI command"

0 commit comments

Comments
 (0)