diff --git a/.github/workflows/update_notice.yml b/.github/workflows/update_notice.yml new file mode 100644 index 00000000..27fe2cc3 --- /dev/null +++ b/.github/workflows/update_notice.yml @@ -0,0 +1,26 @@ +name: Update THIRD_PARTY_NOTICE + +on: + push: + branches: + - '*-release' + +jobs: + update-notice: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Update THIRD_PARTY_NOTICE + run: | + echo "*** Running ORT analyzer ***" + docker run -v "$(pwd)":/project philipssoftware/ort --info analyze -f JSON -i /project -o /project/ort + echo "*** Creating ORT report ***" + docker run -v "$(pwd)":/project philipssoftware/ort --info report -f StaticHtml,WebApp,Excel,NoticeTemplate,SPDXDocument,GitLabLicensemodel,AsciiDocTemplate,CycloneDx,EvaluatedModel -i /project/ort/analyzer-result.json -o /project/ort + cp ort/NOTICE_default THIRD_PARTY_NOTICE + - name: Commit THIRD_PARTY_NOTICE + run: | + git config --global user.name 'Ute Weiss' + git config --global user.email 'ute.weiss@tngtech.com' + git add THIRD_PARTY_NOTICE + git commit -sam "chore: update THIRD_PARTY_NOTICE" + git push diff --git a/release.sh b/release.sh index 170a17e4..f59f197b 100755 --- a/release.sh +++ b/release.sh @@ -44,7 +44,7 @@ fi git pull "${UPSTREAM_URL}" "${UPSTREAM_BRANCH}" echo "Checking version in package.json" -if [ ! -n "$(sed -n -e "/\"version\": \"${VERSION}\"/ p" package.json)" ]; then +if [ -z "$(sed -n -e "/\"version\": \"${VERSION}\"/ p" package.json)" ]; then echo "Version in package.json is not $VERSION!" exit 1 fi