Skip to content

Commit

Permalink
Merge pull request #24 from philips-software/develop
Browse files Browse the repository at this point in the history
Prepare for new release
  • Loading branch information
JeroenKnoops authored Nov 16, 2021
2 parents 7449aee + e97af57 commit 5fee92f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Get SPDX license overview
| parameter | description | required | default |
| - | - | - | - |
| project | project | `true` | spdx-builder |
| spdx-builder-version | spdx-builder-version | `true` | v0.7.0 |
| spdx-builder-version | spdx-builder-version | `true` | v0.8.1 |
| mode | Scan mode. Can be 'ort', 'blackduck' or 'tree' | `true` | ort |
| scanner-url | scanner-url (license-scanner) | `false` | |
| bombase-url | bombase-url (in case of mode: 'tree') | `false` | |
Expand All @@ -43,6 +43,7 @@ Get SPDX license overview
| blackduck-token | Blackduck token (in case of mode: 'blackduck') | `false` | |
| blackduck-project | Blackduck project (in case of mode: 'blackduck') | `false` | |
| blackduck-version | Blackduck version (in case of mode: 'blackduck') | `false` | |
| optional-arguments | Optional arguments like `--tree`, `--release`, `--force` and `--custom` | `false` | |



Expand Down Expand Up @@ -80,7 +81,7 @@ Make sure you have a proper `.spdx-builder.yml` file in your project.
java-version: '11.0.1'
- name: Create spdx-file
id: spdx-builder
uses: philips-software/spdx-action@v0.6.0
uses: philips-software/spdx-action@v0.8.1
with:
project: my-project
mode: ort
Expand All @@ -101,7 +102,7 @@ Make sure you have a proper `.spdx-builder.yml` file in your project.
npm list --all --production > npm-dependencies.txt
- name: Create spdx-file
id: spdx-builder
uses: philips-software/spdx-action@v0.6.0
uses: philips-software/spdx-action@v0.8.1
with:
project: my-project
mode: 'tree'
Expand All @@ -122,7 +123,7 @@ Make sure you have a proper `.spdx-builder.yml` file in your project.
java-version: '11.0.1'
- name: Create spdx-file
id: spdx-builder
uses: philips-software/spdx-action@v0.6.0
uses: philips-software/spdx-action@v0.8.1
with:
project: my-project
mode: 'blackduck'
Expand All @@ -149,7 +150,3 @@ This module is part of the Philips Forest.

CI
```
Talk to the forestkeepers in the `forest`-channel on Slack.
[![Slack](https://philips-software-slackin.now.sh/badge.svg)](https://philips-software-slackin.now.sh)
32 changes: 28 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inputs:
spdx-builder-version:
description: "spdx-builder-version"
required: true
default: 'v0.7.0'
default: 'v0.8.1'
mode:
description: "Scan mode. Can be 'ort', 'blackduck' or 'tree'"
required: true
Expand Down Expand Up @@ -63,6 +63,9 @@ inputs:
blackduck-version:
description: "Blackduck version (in case of mode: 'blackduck')"
required: false
optional-arguments:
description: "Optional arguments like `--tree`, `--release`, `--force` and `--custom`"
required: false

runs:
using: "composite"
Expand All @@ -82,6 +85,7 @@ runs:
env:
ORT_FILE: ${{ inputs.ort-file }}
MODE: ${{ inputs.mode }}
OPTIONAL_ARGUMENTS: ${{ inputs.optional-arguments }}
- name: Create SPDX file with ORT
id: spdx-ort
run: |
Expand All @@ -94,6 +98,7 @@ runs:
echo " SCANNER_URL : ${SCANNER_URL} "
echo " UPLOAD_URL : ${UPLOAD_URL} "
echo " ORT_FILE : ${ORT_FILE} "
echo " OPTIONAL_ARGUMENTS : ${OPTIONAL_ARGUMENTS} "
echo "--------------------------------------------------------------------"
echo ""
echo "--------------------------------------------------------------------"
Expand All @@ -116,9 +121,14 @@ runs:
[ -z "$UPLOAD_URL" ] && UPLOAD_ARG="" || UPLOAD_ARG="--upload ${UPLOAD_URL}"
echo " UPLOAD_ARG: ${UPLOAD_ARG}"
echo "--------------------------------------------------------------------"
echo " Set OPTIONAL_ARG"
echo "--------------------------------------------------------------------"
[ -z "$OPTIONAL_ARGUMENTS" ] && OPTIONAL_ARG="" || OPTIONAL_ARG="${OPTIONAL_ARGUMENTS}"
echo " OPTIONAL_ARG: ${OPTIONAL_ARG}"
echo "--------------------------------------------------------------------"
echo " Running SPDX-builder"
echo "--------------------------------------------------------------------"
java -jar spdx-builder.jar ort -c .spdx-builder.yml -o ${PROJECT}.spdx ${INPUT_FILE} ${SCANNER_ARG} ${UPLOAD_ARG}
java -jar spdx-builder.jar ort -c .spdx-builder.yml -o ${PROJECT}.spdx ${INPUT_FILE} ${SCANNER_ARG} ${UPLOAD_ARG} ${OPTIONAL_ARG}
echo "--------------------------------------------------------------------"
echo "Finished!"
echo "--------------------------------------------------------------------"
Expand All @@ -130,6 +140,7 @@ runs:
ORT_FILE: ${{ inputs.ort-file }}
UPLOAD_URL: ${{ inputs.upload-url }}
MODE: ${{ inputs.mode }}
OPTIONAL_ARGUMENTS: ${{ inputs.optional-arguments }}
shell: bash
- name: Create SPDX file with tree
id: spdx-tree
Expand All @@ -144,6 +155,7 @@ runs:
echo " UPLOAD_URL : ${UPLOAD_URL} "
echo " TREE : ${TREE} "
echo " FORMAT : ${FORMAT} "
echo " OPTIONAL_ARGUMENTS : ${OPTIONAL_ARGUMENTS} "
echo "--------------------------------------------------------------------"
echo ""
echo "--------------------------------------------------------------------"
Expand All @@ -161,9 +173,14 @@ runs:
[ -z "$UPLOAD_URL" ] && UPLOAD_ARG="" || UPLOAD_ARG="--upload ${UPLOAD_URL}"
echo " UPLOAD_ARG: ${UPLOAD_ARG}"
echo "--------------------------------------------------------------------"
echo " Set OPTIONAL_ARG"
echo "--------------------------------------------------------------------"
[ -z "$OPTIONAL_ARGUMENTS" ] && OPTIONAL_ARG="" || OPTIONAL_ARG="${OPTIONAL_ARGUMENTS}"
echo " OPTIONAL_ARG: ${OPTIONAL_ARG}"
echo "--------------------------------------------------------------------"
echo " Running SPDX-builder"
echo "--------------------------------------------------------------------"
cat "${TREE}" | java -jar spdx-builder.jar tree -f ${FORMAT} -c .spdx-builder.yml -o ${PROJECT}.spdx ${BOMBASE_ARG} ${UPLOAD_ARG}
cat "${TREE}" | java -jar spdx-builder.jar tree -f ${FORMAT} -c .spdx-builder.yml -o ${PROJECT}.spdx ${BOMBASE_ARG} ${UPLOAD_ARG} ${OPTIONAL_ARG}
echo "--------------------------------------------------------------------"
echo "Finished!"
echo "--------------------------------------------------------------------"
Expand All @@ -175,6 +192,7 @@ runs:
FORMAT: ${{ inputs.format }}
UPLOAD_URL: ${{ inputs.upload-url }}
MODE: ${{ inputs.mode }}
OPTIONAL_ARGUMENTS: ${{ inputs.optional-arguments }}
shell: bash
- name: Create SPDX file with blackduck
id: spdx-blackduck
Expand All @@ -191,6 +209,7 @@ runs:
echo " BLACKDUCK_VERSION : ${BLACKUCK_VERSION} "
echo " BLACKDUCK_URL : ${BLACKUCK_URL} "
echo " BLACKDUCK_TOKEN : ${BLACKUCK_TOKEN} "
echo " OPTIONAL_ARGUMENTS : ${OPTIONAL_ARGUMENTS} "
echo "--------------------------------------------------------------------"
echo ""
echo "--------------------------------------------------------------------"
Expand All @@ -208,9 +227,14 @@ runs:
[ -z "$UPLOAD_URL" ] && UPLOAD_ARG="" || UPLOAD_ARG="--upload ${UPLOAD_URL}"
echo " UPLOAD_ARG: ${UPLOAD_ARG}"
echo "--------------------------------------------------------------------"
echo " Set OPTIONAL_ARG"
echo "--------------------------------------------------------------------"
[ -z "$OPTIONAL_ARGUMENTS" ] && OPTIONAL_ARG="" || OPTIONAL_ARG="${OPTIONAL_ARGUMENTS}"
echo " OPTIONAL_ARG: ${OPTIONAL_ARG}"
echo "--------------------------------------------------------------------"
echo " Running SPDX-builder"
echo "--------------------------------------------------------------------"
java -jar spdx-builder.jar blackduck -o ${PROJECT}.spdx --url ${BLACKDUCK_URL} --token ${BLACKDUCK_TOKEN} ${BLACKDUCK_PROJECT} ${BLACKDUCK_VERSION} ${BOMBASE_ARG} ${UPLOAD_ARG}
java -jar spdx-builder.jar blackduck -o ${PROJECT}.spdx --url ${BLACKDUCK_URL} --token ${BLACKDUCK_TOKEN} ${BLACKDUCK_PROJECT} ${BLACKDUCK_VERSION} ${BOMBASE_ARG} ${UPLOAD_ARG} ${OPTIONAL_ARG}
echo "--------------------------------------------------------------------"
echo "Finished!"
echo "--------------------------------------------------------------------"
Expand Down

0 comments on commit 5fee92f

Please sign in to comment.