Skip to content

Commit fa559bc

Browse files
committed
Update purl-types-index.json path references
Also sort the index Signed-off-by: Philippe Ombredanne <pombredanne@aboutcode.org>
1 parent 496e6ff commit fa559bc

3 files changed

Lines changed: 26 additions & 26 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ checkjson:
4949
@echo "-> Validate JSON schemas"
5050
@${ACTIVATE} check-jsonschema --check-metaschema --verbose schemas/*.json
5151
@echo "-> Validate JSON data files against the schemas"
52-
@${ACTIVATE} check-jsonschema --schemafile schemas/purl-types-index.schema.json --verbose types/purl-types-index.json
52+
@${ACTIVATE} check-jsonschema --schemafile schemas/purl-types-index.schema.json --verbose purl-types-index.json
5353
@${ACTIVATE} check-jsonschema --schemafile schemas/purl-type-definition.schema.json --verbose types/*-definition.json
5454
@${ACTIVATE} check-jsonschema --schemafile schemas/purl-test.schema.json --verbose tests/*/*-test.json
5555

etc/scripts/generate_index_and_docs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def generate_documentation(definition) -> str:
161161
mddoc.write_text(md, newline="\n")
162162
print(f"PURL Type Documentation generated for {mddoc}")
163163

164-
idxdoc = types_dir / "purl-types-index.json"
165-
idx = json.dumps(types, indent=2) + "\n"
164+
idxdoc = Path("purl-types-index.json")
165+
idx = json.dumps(sorted(types), indent=2) + "\n"
166166
idxdoc.write_text(idx, newline="\n")
167167
print(f"PURL Types Index generated at {idxdoc}")

purl-types-index.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
[
2-
"bitbucket",
3-
"pub",
4-
"npm",
52
"alpm",
6-
"nuget",
7-
"hackage",
8-
"oci",
9-
"conan",
3+
"apk",
4+
"bitbucket",
105
"bitnami",
6+
"cargo",
7+
"cocoapods",
8+
"composer",
9+
"conan",
10+
"conda",
11+
"cpan",
12+
"cran",
13+
"deb",
14+
"docker",
1115
"gem",
12-
"luarocks",
16+
"generic",
1317
"github",
18+
"golang",
19+
"hackage",
1420
"hex",
15-
"composer",
16-
"cargo",
17-
"docker",
21+
"huggingface",
22+
"luarocks",
23+
"maven",
1824
"mlflow",
25+
"npm",
26+
"nuget",
27+
"oci",
28+
"pub",
1929
"pypi",
20-
"swid",
2130
"qpkg",
22-
"golang",
23-
"cran",
24-
"huggingface",
25-
"generic",
26-
"apk",
27-
"cocoapods",
28-
"cpan",
29-
"swift",
30-
"deb",
3131
"rpm",
32-
"maven",
33-
"conda"
32+
"swid",
33+
"swift"
3434
]

0 commit comments

Comments
 (0)