File tree Expand file tree Collapse file tree
schema/support/bundling-scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ export CVE_SCHEMA_DIR=schema
2+ export CVE_SCHEMA_FILENAME=CVE_Record_Format.json
3+ mkdir ~ /.npm-global
4+ npm config set prefix ~ /.npm-global
5+ export PATH=~ /.npm-global/bin:$PATH
6+ npm --prefix " ${CVE_SCHEMA_DIR} /support/schema2markmap" install " ${CVE_SCHEMA_DIR} /support/schema2markmap"
7+ npm install --loglevel verbose -g yargs ajv-formats@" ^1.5.x" ajv-cli@" ^4.0.x"
8+ sed ' s/file\://g' " ${CVE_SCHEMA_DIR} /${CVE_SCHEMA_FILENAME} " > " ${CVE_SCHEMA_DIR} /cve-schema.json"
9+ node " ${CVE_SCHEMA_DIR} /support/schema2markmap/schema-bundle.js" " ${CVE_SCHEMA_DIR} /cve-schema.json" " ${CVE_SCHEMA_DIR} /docs/"
10+ ajv compile -c ajv-formats -s " ${CVE_SCHEMA_DIR} /docs/CVE_Record_Format_bundled.json"
11+ ajv validate -c ajv-formats -s " ${CVE_SCHEMA_DIR} /docs/CVE_Record_Format_bundled.json" -d " ${CVE_SCHEMA_DIR} /docs/full-record-basic-example.json"
12+ ajv validate -c ajv-formats -s " ${CVE_SCHEMA_DIR} /docs/CVE_Record_Format_bundled.json" -d " ${CVE_SCHEMA_DIR} /docs/full-record-advanced-example.json"
13+ ajv validate -c ajv-formats -s " ${CVE_SCHEMA_DIR} /docs/CVE_Record_Format_bundled_cnaPublishedContainer.json" -d " ${CVE_SCHEMA_DIR} /docs/cnaContainer-advanced-example.json"
14+ ajv validate -c ajv-formats -s " ${CVE_SCHEMA_DIR} /docs/CVE_Record_Format_bundled_cnaPublishedContainer.json" -d " ${CVE_SCHEMA_DIR} /docs/cnaContainer-basic-example.json"
You can’t perform that action at this time.
0 commit comments