release-version-by-git
v1.0.2
Published
generate public release version from git info. designed in accordance with semantic versioning
Readme
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
- if has git info, then generate version by git info and
package.json- style:
${major}.${minor}.${patch}-${branch}.${hash},major、minor、patchfrompkg.version
- style:
- if don't has git info, then copy from
package.jsonversion. - Support
gitlab CI, if ingitlab ci build, prioritize the use of environmental variables
