Skip to content

Commit

Permalink
Merge pull request #231 from CycloneDX/v1.5-dev
Browse files Browse the repository at this point in the history
[WIP] finalize 1.5
  • Loading branch information
stevespringett authored Jun 26, 2023
2 parents d37a107 + c6a43ca commit c320fc0
Show file tree
Hide file tree
Showing 175 changed files with 21,157 additions and 1,550 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: JS CI

on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


defaults:
run:
working-directory: tools/src/test/js

jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v3
- name: Setup Node.js
# see https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install Depenencies
run: npm install
- name: Run test
run: npm test
1 change: 1 addition & 0 deletions docgen/json/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/docs/
9 changes: 5 additions & 4 deletions docgen/json/gen.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
rm -f -R docs
mkdir -p docs/{1.2,1.3,1.4}
mkdir -p docs/{1.2,1.3,1.4,1.5}

# Check to see if generate-schema-doc is executable and is in the path. If not, install JSON Schema for Humans.
if ! [ -x "$(command -v generate-schema-doc)" ]; then
pip3 install json-schema-for-humans==0.39.5
pip3 install json-schema-for-humans==0.44.3
fi

generate () {
Expand All @@ -18,12 +18,13 @@ generate () {
SCHEMA_FILE='../../schema/bom-'$version'.schema.json'
fi
echo $SCHEMA_FILE
generate-schema-doc --config no_link_to_reused_ref --config no_show_breadcrumbs --config no_collapse_long_descriptions --config deprecated_from_description --config title="$title" --config custom_template_path=$(pwd)'/templates/cyclonedx/base.html' --minify $SCHEMA_FILE 'docs/'$version'/index.html'
generate-schema-doc --config no_link_to_reused_ref --config no_show_breadcrumbs --config no_collapse_long_descriptions --deprecated-from-description --config title="$title" --config custom_template_path=$(pwd)'/templates/cyclonedx/base.html' --minify $SCHEMA_FILE 'docs/'$version'/index.html'
sed -i -e "s/\${quotedTitle}/\"$title\"/g" 'docs/'$version'/index.html'
sed -i -e "s/\${title}/$title/g" 'docs/'$version'/index.html'
sed -i -e "s/\${version}/$version/g" 'docs/'$version'/index.html'
}

generate 1.2
generate 1.3
generate 1.4
generate 1.4
generate 1.5
2 changes: 2 additions & 0 deletions docgen/json/templates/cyclonedx/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@
v${version} (JSON)
</a>
<ul class="dropdown-menu" aria-labelledby="navbarScrollingDropdown">
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.5/json/">v1.5 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.4/json/">v1.4 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.3/json/">v1.3 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.2/json/">v1.2 (JSON)</a></li>
<li><hr class="dropdown-divider"/></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.5/xml/">v1.5 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.4/xml/">v1.4 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.3/xml/">v1.3 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.2/xml/">v1.2 (XML)</a></li>
Expand Down
2 changes: 2 additions & 0 deletions docgen/xml/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/docs/
/Saxon-HE-*.jar
3 changes: 2 additions & 1 deletion docgen/xml/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ generate 1.0
generate 1.1
generate 1.2
generate 1.3
generate 1.4
generate 1.4
generate 1.5
4 changes: 3 additions & 1 deletion docgen/xml/xs3p.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<xsl:param name="externalCSSURL"></xsl:param>

<!-- Link to JQuery. -->
<xsl:param name="jQueryURL">https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js</xsl:param>
<xsl:param name="jQueryURL">https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js</xsl:param>

<!-- Link base to Bootstrap CSS and JS. The files
<bootstrapURL>/css/bootstrap.min.css and
Expand Down Expand Up @@ -339,10 +339,12 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle version-selector" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">v<xsl:value-of select="$cycloneDxVersion"/> (XML)<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.5/json/">v1.5 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.4/json/">v1.4 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.3/json/">v1.3 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.2/json/">v1.2 (JSON)</a></li>
<li style="padding:0"><hr class="dropdown-divider"/></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.5/xml/">v1.5 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.4/xml/">v1.4 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.3/xml/">v1.3 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.2/xml/">v1.2 (XML)</a></li>
Expand Down
Loading

0 comments on commit c320fc0

Please sign in to comment.