Skip to content

Commit dfc62f4

Browse files
committed
Stuff about phpHasManifest
See #7
1 parent ec2a37f commit dfc62f4

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

README.md

+16-7
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,24 @@ The Textpattern plugins website digests the information for each card to provide
3636
"beta": {
3737
"version": "3.7.1-beta.3",
3838
"datePublished": "2020-06-26",
39-
"downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.1-beta.3.zip"
39+
"downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.1-beta.3.zip",
40+
"phpHasManifest": 1
4041
},
4142
"stable": {
4243
"version": "3.7.0",
4344
"datePublished": "2020-02-14",
4445
"downloadUrlTxt": "https://github.com/exampleuser/abc_example/releases/download/3.7.0/abc_example_v3.7.0.txt",
45-
"downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.0.zip"
46+
"downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.0.zip",
47+
"phpHasManifest": 1
4648
},
4749
"legacy": [
4850
{
4951
"4.6": {
5052
"version": "v2.5.3",
5153
"datePublished": "2018-10-18",
5254
"downloadUrlTxt": "https://github.com/exampleuser/abc_example/archive/v2.5.3.txt",
53-
"downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/v2.5.3.tar.gz"
55+
"downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/v2.5.3.tar.gz",
56+
"phpHasManifest": 0
5457
}
5558
},
5659
{
@@ -75,23 +78,25 @@ We also provide a [JSON template](https://raw.githubusercontent.com/textpattern/
7578
`stable`, `beta` and `legacy` nodes each require a `version` entry in `semver` format (e.g. `1.3.8`).
7679
* `downloadUrlTxt` and/or `downloadUrlPhp`:\
7780
`stable`, `beta` and `legacy` nodes each require at least one of either `downloadUrlTxt` and/or `downloadUrlPhp` nodes to be stated. `downloadUrlTxt` refers to the download URL of the TXT-encoded version of the plugin, `downloadUrlPhp` refers to the download URL of the PHP version of the plugin.
78-
81+
* `phpHasManifest`:\
82+
`stable`, `beta` and `legacy` nodes each require a `phpHasManifest` entry if `downloadUrlPhp` nodes are stated. Boolean values (`1` if the `manifest.json` file exists, otherwise `0`). If a `phpHasManifest` entry is missing, it is assumed the manifest.json file does not exist for that release. When only `downloadUrlTxt` is stated, the `phpHasManifest` entry is not required (and is ignored, if present). For more information on plugin manifest files, [see below](#manifests-for-php-versions-of-plugins).
7983

8084
### Example absolute minimum structure
8185

82-
This is the absolute minimum that is required in each JSON file. Note that, as described above, `stable` or `beta` could be stated on line 3:
86+
This is the absolute minimum that is required in each JSON file. Note that, as described above, `stable` or `beta` could be stated on line 3. `phpHasManifest` is required when a `downloadUrlPhp` is stated (not required if only a `downloadUrlTxt` is stated):
8387

8488
```JSON
8589
{
8690
"name": "abc_example",
8791
"stable": {
8892
"version": "3.7.0",
89-
"downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.0.zip"
93+
"downloadUrlPhp": "https://github.com/exampleuser/abc_example/archive/3.7.0.zip",
94+
"phpHasManifest": 1
9095
}
9196
}
9297
```
9398

94-
### Optional entries
99+
### Optional (but recommended) entries
95100

96101
* `repositories`:\
97102
One or more code repositories where the the project is maintained. For each entry, a `repoType` and `repoUrl` must be provided. For `repoType` expected values are either `homepage` (i.e. page on an author's website specifically about the plugin), `github`, `bitbucket` or `gitlab`.
@@ -100,6 +105,10 @@ This is the absolute minimum that is required in each JSON file. Note that, as d
100105
* `legacy`:\
101106
One or more releases that are specifically for older versions of Textpattern. Each legacy release must be labelled with the maximum version series of Textpattern it worked with. For example `4.6`.
102107

108+
### Manifests for PHP versions of plugins
109+
110+
TODO
111+
103112
### Linting
104113

105114
You can run a linter over the JSON files to check validity as follows (requires [Node.js](https://nodejs.org/)):

template.json

+8-4
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,33 @@
1010
"version": "{semver}",
1111
"datePublished": "{yyyy}-{mm}-{dd}",
1212
"downloadUrlTxt": "{url-of-txt-plugin}",
13-
"downloadUrlPhp": "{url-of-php-plugin}"
13+
"downloadUrlPhp": "{url-of-php-plugin}",
14+
"phpHasManifest": "{boolean}"
1415
},
1516
"stable": {
1617
"version": "{semver}",
1718
"datePublished": "{yyyy}-{mm}-{dd}",
1819
"downloadUrlTxt": "{url-of-txt-plugin}",
19-
"downloadUrlPhp": "{url-of-php-plugin}"
20+
"downloadUrlPhp": "{url-of-php-plugin}",
21+
"phpHasManifest": "{boolean}"
2022
},
2123
"legacy": [
2224
{
2325
"4.6": {
2426
"version": "{semver}",
2527
"datePublished": "{yyyy}-{mm}-{dd}",
2628
"downloadUrlTxt": "{url-of-txt-plugin}",
27-
"downloadUrlPhp": "{url-of-php-plugin}"
29+
"downloadUrlPhp": "{url-of-php-plugin}",
30+
"phpHasManifest": "{boolean}"
2831
}
2932
},
3033
{
3134
"4.5": {
3235
"version": "{semver}",
3336
"datePublished": "{yyyy}-{mm}-{dd}",
3437
"downloadUrlTxt": "{url-of-txt-plugin}",
35-
"downloadUrlPhp": "{url-of-php-plugin}"
38+
"downloadUrlPhp": "{url-of-php-plugin}",
39+
"phpHasManifest": "{boolean}"
3640
}
3741
}
3842
]

0 commit comments

Comments
 (0)