Skip to content

Commit aa530b1

Browse files
committed
Update specification.md
1 parent 87a4a85 commit aa530b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/specification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ To generate a version number `GmodNET.VersionTool` takes a version JSON file of
1515
```
1616
within git repository, where `"Version"` key MUST correspond to a [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) compatible version number value and `"Codename"` key MAY correspond to a string value which, if specified, MUST be a single word of ASCII alphanumerics and hyphens [0-9A-Za-z-].
1717

18-
The resulting version number has the form `[FullVersion]+codename.[codename from version JSON file].head.[git head name].commit.[first 7 symbols of hexadecimal representation of git commit hash].[any additional metadata provided in a "Version" key-value pair of the version JSON file]` where `[FullVersion]` is computed as follows: if the `[version]` value of the `"Version"` key of the version JSON file DOES NOT contain pre-release identifier as described in the [item 9 of the Semantic Versioning 2.0.0 specification](https://semver.org/spec/v2.0.0.html#spec-item-9) then `[FullVersion]` is equal to `[version]`, if the `[version]` value of the `"Version"` key of the version JSON file DOES contain pre-release identifier then `[FullVersion]` equals `[version].[year].[month (numerically)].[day].[hour].[second].[git head name]` where date and time are date and time of the git commit in UTC. `codename.[codename from version JSON file]` can be dropped if there is no codename specified in the version JSON file.
18+
The resulting version number has the form `[FullVersion]+codename.[codename from version JSON file].head.[git head name].commit.[first 7 symbols of hexadecimal representation of git commit hash].[any additional metadata provided in a "Version" key-value pair of the version JSON file]` where `[FullVersion]` is computed as follows: if the `[version]` value of the `"Version"` key of the version JSON file DOES NOT contain pre-release identifier as described in the [item 9 of the Semantic Versioning 2.0.0 specification](https://semver.org/spec/v2.0.0.html#spec-item-9) then `[FullVersion]` is equal to `[version]`, if the `[version]` value of the `"Version"` key of the version JSON file DOES contain pre-release identifier then `[FullVersion]` equals `[version].[number of seconds elapsed since January 1st, 2020 UTC].[git head name]`. `codename.[codename from version JSON file]` can be dropped if there is no codename specified in the version JSON file.
1919

2020
## Examples of resulting version numbers
2121

22-
`0.6.0-beta.1.2020.8.15.13.24.56.NewFeature+head.NewFeature.commit.7a9b35c` provided git repository head is at the `NewFeature` branch and version JSON file
22+
`0.6.0-beta.1.943586.NewFeature+head.NewFeature.commit.7a9b35c` provided git repository head is at the `NewFeature` branch and version JSON file
2323
```json
2424
{
2525
"Version": "0.6.0-beta.1"

0 commit comments

Comments
 (0)