Skip to main content

GitInformation

@webda/core


Interface: GitInformation

Defined in: packages/core/src/application/iconfiguration.ts:205

Return the gather information from the repository

Properties​

branch​

branch: string

Defined in: packages/core/src/application/iconfiguration.ts:217

Current branch

git symbolic-ref --short HEAD


commit​

commit: string

Defined in: packages/core/src/application/iconfiguration.ts:211

Current commit reference

git rev-parse HEAD


short​

short: string

Defined in: packages/core/src/application/iconfiguration.ts:223

Current commit short reference

git rev-parse --short HEAD


tag​

tag: string

Defined in: packages/core/src/application/iconfiguration.ts:227

Current tag name that match the package version


tags​

tags: string[]

Defined in: packages/core/src/application/iconfiguration.ts:233

Return all tags that point to the current HEAD

git tag --points-at HEAD


version​

version: string

Defined in: packages/core/src/application/iconfiguration.ts:246

Current version as return by package.json with auto snapshot

If the version return by package is not in the current tags, the version is incremented to the next patch version with a +{date}

Example:

with package.json version = "1.1.0" name = "mypackage" if a tag "v1.1.0" or "mypackage@1.1.0" then version = "1.1.0" else version = "1.1.1+20201110163014178"