https://github.com/a145789/version-mark
A version marking tool suitable for Web projects, offering more friendly Git version management for both frontend and backend projects/一个适用于 Web 项目的版本标记工具,对前后台项目更友好的 Git 版本管理。
https://github.com/a145789/version-mark
cli release tag version
Last synced: 6 months ago
JSON representation
A version marking tool suitable for Web projects, offering more friendly Git version management for both frontend and backend projects/一个适用于 Web 项目的版本标记工具,对前后台项目更友好的 Git 版本管理。
- Host: GitHub
- URL: https://github.com/a145789/version-mark
- Owner: a145789
- License: mit
- Created: 2024-08-13T07:14:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-15T08:34:22.000Z (over 1 year ago)
- Last Synced: 2025-05-30T01:51:31.889Z (8 months ago)
- Topics: cli, release, tag, version
- Language: TypeScript
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Version Mark
English |
中文
## Introduction
A version marking tool suitable for `Web` projects, offering more friendly `Git` version management for both frontend and backend projects.
## Features
- 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.
## Installation
```bash
pnpm add version-mark -D
yarn add version-mark -D
npm install version-mark -D
```
## Usage
```json
{
"scripts": {
"vmark": "vmark",
"build": "vmark && pnpm run build"
}
}
```
```bash
pnpm run version
yarn run build
```
### Example Output
```text
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.
## Notes
- Ensure that your `package.json` file is located in the current working directory.
- Make sure your git repository is configured with a remote repository.