1.0.2 • Published 11 months ago

release-version-by-git v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

git release version

About

generate public release version from git info. designed in accordance with semantic versioning

Usage

in vite.config.ts

import { getVersion } from 'release-version-by-git'
import { defineConfig, UserConfig } from 'vite'

export default defineConfig(async (env): Promise<UserConfig> => {
    const version = await getVersion()
    return {}
})

Rules

  1. if has git info, then generate version by git info and package.json
    1. style: ${major}.${minor}.${patch}-${branch}.${hash}, majorminorpatch from pkg.version
  2. if don't has git info, then copy from package.json version.
  3. Support gitlab CI, if in gitlab ci build, prioritize the use of environmental variables
1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago