Skip to content

Commit 87a4a85

Browse files
committed
Update specification
1 parent 257451d commit 87a4a85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/specification.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ 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].[tag or branch or pull].[tag or branch or pull request 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]` 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].[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.
1919

2020
## Examples of resulting version numbers
2121

22-
`0.6.0-beta.1.2020.8.15.13.24.56+branch.master.commit.7a9b35c` provided git repository at the `master` branch and version JSON file
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
2323
```json
2424
{
2525
"Version": "0.6.0-beta.1"
2626
}
2727
```
2828

29-
`1.0.0+codename.Ural.tag.1-0-0.commit.788963a.bugfix14` provided git repository at the `1.0.0` tag and version JSON file
29+
`1.0.0+codename.Ural.head.master.commit.788963a.bugfix14` provided git repository head is at the `master` branch and version JSON file
3030
```json
3131
{
3232
"Version": "1.0.0+bugfix14",

0 commit comments

Comments
 (0)