Skip to content

A version marking tool suitable for Web projects, offering more friendly Git version management for both frontend and backend projects/一个适用于 Web 项目的版本标记工具,对前后台项目更友好的 Git 版本管理。

License

Notifications You must be signed in to change notification settings

a145789/version-mark

Repository files navigation

Version Mark

English | 中文

NPM Version License

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

pnpm add version-mark -D
yarn add version-mark -D
npm install version-mark -D

Usage

{
  "scripts": {
    "vmark": "vmark",
    "build": "vmark && pnpm run build"
  }
}
pnpm run version
yarn run build

Example Output

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.

About

A version marking tool suitable for Web projects, offering more friendly Git version management for both frontend and backend projects/一个适用于 Web 项目的版本标记工具,对前后台项目更友好的 Git 版本管理。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published