diff --git a/.github/workflows/license-check/license-check.sh b/.github/workflows/license-check/license-check.sh new file mode 100755 index 000000000..b23dc8440 --- /dev/null +++ b/.github/workflows/license-check/license-check.sh @@ -0,0 +1,49 @@ +#!/bin/bash +IFS=$'\n' + +readarray -t whitelist < ./.github/workflows/license-check/license-whitelist.txt +readarray -t specialcases < <( grep -vE "^#" ./.github/workflows/license-check/license-special-cases.txt ) + +exitStatus=0 + +for specialcase in "${specialcases[@]}" +do + echo "Special case: " "$specialcase" +done + +readarray -t thirdparty < <( tail -n +3 ./target/generated-sources/license/THIRD-PARTY.txt ) +for thirdpartyentry in "${thirdparty[@]}" +do + allLicensesValid=true + # Remove leading spaces + thirdpartyentry="${thirdpartyentry#"${thirdpartyentry%%[![:space:]]*}"}" + echo "Evaluating Dependency: " "$thirdpartyentry" + if [[ $(echo "${specialcases[@]}" | fgrep -w $thirdpartyentry) ]] + then + echo " Ignoring: " "$thirdpartyentry" + else + licenses=($(echo $thirdpartyentry | awk -vRS=")" -vFS="(" '{print $2}')) + for (( i=0; i < ${#licenses[@]} - 1 ; i++ )) + do + #echo ${licenses[i]} + licenseToCheck=${licenses[i]} + if [[ $(echo "${whitelist[@]}" | fgrep -w $licenseToCheck) ]] + then + #do nothing bsh no-op + : + else + echo " Unknown license found: " $licenseToCheck + allLicensesValid=false + exitStatus=1 + fi + done + fi + if $allLicensesValid + then + echo " All licenses OK" + else + echo " Possible license incompatibilities found" + fi +done + +exit $exitStatus \ No newline at end of file diff --git a/.github/workflows/license-check/license-special-cases.txt b/.github/workflows/license-check/license-special-cases.txt new file mode 100644 index 000000000..906c41759 --- /dev/null +++ b/.github/workflows/license-check/license-special-cases.txt @@ -0,0 +1,3 @@ +(Unknown license) javaparser (com.google.code.javaparser:javaparser:1.0.11 - http://code.google.com/p/javaparser/) +# IGNORE ME +(Apache Software License 2.0) HAPI FHIR - Validation Resources (FHIR R4) (ca.uhn.hapi.fhir:hapi-fhir-validation-resources-r4:6.4.1 - https://hapifhir.io/hapi-deployable-pom/hapi-fhir-validation-resources-r4) \ No newline at end of file diff --git a/.github/workflows/license-check/license-whitelist.txt b/.github/workflows/license-check/license-whitelist.txt new file mode 100644 index 000000000..f734f12c1 --- /dev/null +++ b/.github/workflows/license-check/license-whitelist.txt @@ -0,0 +1,25 @@ +The Apache Software License, Version 2.0 +Apache Software License, version 1.1 +Apache Software License 2.0 +The Apache License, Version 2.0 +The Apache Software License, Version 2.0 +MIT License +The MIT License +Apache Software License, version 1.1 +Apache 2 +Apache 2.0 +Apache License 2.0 +Eclipse Public License v2.0 +BSD licence +The BSD License +BSD-Style License +BSD License 3 +New BSD License +BSD 3 Clause +The JSON License +Eclipse Public License - v 1.0 +Eclipse Public License v. 2.0 +Eclipse Distribution License v. 1.0 +Eclipse Distribution License - v 1.0 +Unicode/ICU License +BSD 2-Clause License \ No newline at end of file diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 000000000..86e85e017 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,30 @@ +# This is a basic workflow that is manually triggered + +name: License Check + +on: + workflow_dispatch: + + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "greet" + check: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Collect module licenses + run: mvn clean install -DskipTests + - name: Collect module licenses + run: mvn license:add-third-party + - name: Aggregate licenses + run: mvn license:aggregate-add-third-party + - name: Set script permissions + run: chmod u+x .github/workflows/license-check/license-check.sh + - name: Run script + run: .github/workflows/license-check/license-check.sh + continue-on-error: true diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2f788ead1..7b06c6ab5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,19 +1,7 @@ ## Validator Changes -* Fix problem with evaluating extension contexts -* Fix up support for inactive codes and fix error message syntax -* Fix issue with collection status of resolve() being wrong -* Improved paths in profile error messages -* Fix problem with extension slicing being missed sometimes. -* Fix problem with code validation caching ignoring whitespace -* Produce useful error message when whitespace is wrong in display name -* Support for x-version extensions when generating snapshots +* no changes ## Other code changes -* Render inactive property in expansions -* Resolve URL for x-version extensions -* Don't warn for loading a wrong version package more than once -* Do not supercede R4 terminology when loading R5 IGs -* Migrate type support when generating differentials - +* no changes \ No newline at end of file diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index 87657d416..934701ca5 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index 5797b1a2c..982979400 100644 --- a/org.hl7.fhir.dstu2/pom.xml +++ b/org.hl7.fhir.dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 4ad20750f..14b6af817 100644 --- a/org.hl7.fhir.dstu2016may/pom.xml +++ b/org.hl7.fhir.dstu2016may/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index 17056f54a..de2223d63 100644 --- a/org.hl7.fhir.dstu3/pom.xml +++ b/org.hl7.fhir.dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 2e1024bd8..00d596acb 100644 --- a/org.hl7.fhir.r4/pom.xml +++ b/org.hl7.fhir.r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index 555f61798..2cc0ac0cf 100644 --- a/org.hl7.fhir.r4b/pom.xml +++ b/org.hl7.fhir.r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index 694145870..b8f690535 100644 --- a/org.hl7.fhir.r5/pom.xml +++ b/org.hl7.fhir.r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 6f5dcae12..7b44f4c5f 100644 --- a/org.hl7.fhir.report/pom.xml +++ b/org.hl7.fhir.report/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index b3ed07d98..475ec5a2a 100644 --- a/org.hl7.fhir.utilities/pom.xml +++ b/org.hl7.fhir.utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index c3167bc0d..034a2209a 100644 --- a/org.hl7.fhir.validation.cli/pom.xml +++ b/org.hl7.fhir.validation.cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 3b892cd43..f1d784b1a 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index e95160b52..254bb68b6 100644 --- a/pom.xml +++ b/pom.xml @@ -14,13 +14,13 @@ HAPI FHIR --> org.hl7.fhir.core - 6.0.25-SNAPSHOT + 6.0.26-SNAPSHOT pom 32.0.1-jre 6.4.1 - 1.3.25-SNAPSHOT + 1.3.25 2.15.2 5.9.2 1.8.2