Skip to content

Commit

Permalink
Add versioning.json file (#36714)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg committed Nov 3, 2021
1 parent 6e294cc commit c3dbab7
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
"fileMatch": ["build-system/tasks/bundle-size/filesize.json"],
"url": "./build-system/json-schemas/filesize.json"
},
{
"fileMatch": ["build-system/global-configs/versioning.json"],
"url": "./build-system/json-schemas/versioning.json"
},
{
"fileMatch": ["test/visual-diff/visual-tests.jsonc"],
"url": "./build-system/json-schemas/visual-tests.json"
Expand Down
6 changes: 6 additions & 0 deletions build-system/global-configs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,9 @@ Example:
```

Once merged onto the `main` branch, this file is automatically picked up by the AMP CDN (usually within 1-2 hours from PR merge) and its content is injected into `v0.[m]js`. AMP caches can also inject the contents of this file verbatim into pages inside a `<script language=text/json id=__AMP_EXP>{...}</script>` element.

# versioning.json

Defines the routing between channels and RTVs (see [Versioning section in amp-framework-hosting.md](../../docs/spec/amp-framework-hosting.md#versioning) for an explanation of AMP versions and RTV numbers).

Currently in testing in preparation for [#36152](https://github.com/ampproject/amphtml/issues/36152).
12 changes: 12 additions & 0 deletions build-system/global-configs/versioning.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"beta": "030000000000000",
"control": "020000000000000",
"experimental": "000000000000000",
"experimentA": null,
"experimentB": null,
"experimentC": null,
"lts": "010000000000000",
"nightly": "040000000000000",
"nightly-control": "050000000000000",
"stable": "010000000000000"
}
69 changes: 69 additions & 0 deletions build-system/json-schemas/versioning.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Versioning (RTV) information",
"type": "object",
"required": [
"beta",
"control",
"experimental",
"experimentA",
"experimentB",
"experimentC",
"lts",
"nightly",
"nightly-control",
"stable"
],
"properties": {
"beta": {
"type": "string",
"pattern": "03\\d{13}"
},
"control": {
"type": "string",
"pattern": "02\\d{13}"
},
"experimental": {
"type": "string",
"pattern": "00\\d{13}"
},
"experimentA": {
"type": [
"string",
"null"
],
"pattern": "10\\d{13}"
},
"experimentB": {
"type": [
"string",
"null"
],
"pattern": "11\\d{13}"
},
"experimentC": {
"type": [
"string",
"null"
],
"pattern": "12\\d{13}"
},
"lts": {
"type": "string",
"pattern": "01\\d{13}"
},
"nightly": {
"type": "string",
"pattern": "04\\d{13}"
},
"nightly-control": {
"type": "string",
"pattern": "05\\d{13}"
},
"stable": {
"type": "string",
"pattern": "01\\d{13}"
}
},
"additionalProperties": false
}

0 comments on commit c3dbab7

Please sign in to comment.