English | 中文
A version marking tool suitable for Web
projects, offering more friendly Git
version management for both frontend and backend projects.
-
Detect changes in the working directory
- If there are uncommitted changes, only the pre-release version option will be provided.
- If all current changes are committed, options for both the formal version and pre-release version will be provided.
patch
:0.0.1
minor
:0.1.0
major
:1.0.0
prepatch
:0.0.1-0
preminor
:0.1.0-0
premajor
:1.0.0-0
-
Automatically update the version number in
package.json
. -
If it's a formal version, a new git tag will be automatically created and pushed to the remote repository.
pnpm add version-mark -D
yarn add version-mark -D
npm install version-mark -D
{
"scripts": {
"vmark": "vmark",
"build": "vmark && pnpm run build"
}
}
pnpm run version
yarn run build
current version: v1.0.0
? Pick a version
o v1.0.1
o v1.1.0
o v2.0.0
o v1.0.1-202410121365
o v1.1.0-202410121365
o v2.0.0-202410121365
o Skip
After the user makes a selection, the package.json
will be updated, and for formal versions, a new git tag will be created and pushed.
- Ensure that your
package.json
file is located in the current working directory. - Make sure your git repository is configured with a remote repository.