🔢 Standard
app-version.ts
file generator from command line throughgit describe
.
npx
# Generate file
npx gen-app-version
Wrote version info v1.13.0-1-g9697d15 to /path/to/my-git-local-repo/app-version.ts
Global install
# Install package globally
npm i -g gen-app-version
# Generate file
cd my-git-local-repo
gen-app-version
Wrote version info v1.13.0-1-g9697d15 to /path/to/my-git-local-repo/app-version.ts
gen-app-version
genAppVersion (legacy)
export const VERSION = {
dirty: false,
raw: 'v1.0.0-2-gab291c8',
hash: 'gab291c8',
distance: 2,
tag: 'v1.0.0',
semver: {
raw: 'v1.0.0',
major: 1,
minor: 0,
patch: 0,
prerelease: [],
build: [],
version: '1.0.0',
},
suffix: '2-gab291c8',
semverString: '1.0.0+2.gab291c8',
};