Skip to content

Commit d649d54

Browse files
authored
Merge pull request #2765 from opossum-tool/bug/notice_generation_broken_add_e2e_test
test: ensure notices generated do have content
2 parents 3c3a545 + 33da444 commit d649d54

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"update-commit-hash": "run-script-os",
131131
"update-commit-hash:darwin:linux": "COMMIT_INFO=$(git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD); echo \"{\\\"commitInfo\\\" : \\\"$COMMIT_INFO\\\" }\" > \"src/commitInfo.json\"",
132132
"update-commit-hash:win32": "tools/get_app_version_for_windows.bat",
133-
"generate-notice": "mkdirp notices && yarn licenses generate-disclaimer --production > notices/notices.txt && yarn node tools/generateNotices.mjs",
133+
"generate-notice": "mkdirp notices && yarn licenses generate-disclaimer --production > notices/notices.txt && yarn node tools/generateNotices.mjs && ./tools/checkNotices.sh",
134134
"ship-linux": "yarn install-deps:linux && yarn build && tools/build_linux_release.sh",
135135
"ship-win": "yarn install-deps:win32 && yarn build && electron-builder --win --x64 --publish never && mkdirp release/win && mv \"release/OpossumUI Setup 0.1.0.exe\" \"release/win/OpossumUI-for-win.exe\"",
136136
"ship-mac": "yarn install-deps:darwin && yarn build && electron-builder --mac --x64 --publish never && zip -r -y -q 'release/mac/OpossumUI-for-mac.zip' 'release/mac/'",

tools/checkNotices.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
# SPDX-FileCopyrightText: Meta Platforms, Inc. and its affiliates
4+
# SPDX-FileCopyrightText: TNG Technology Consulting GmbH <https://www.tngtech.com>
5+
#
6+
# SPDX-License-Identifier: Apache-2.0
7+
8+
NOTICE_HEADER="THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE OPOSSUM UI PRODUCT."
9+
10+
grep -q "${NOTICE_HEADER}" ./notices/notices.txt || {
11+
echo "Error: Attributions not found in notices.txt"
12+
exit 1
13+
}
14+
grep -q "${NOTICE_HEADER}" ./notices/notices.html || {
15+
echo "Error: Attributions not found in notices.html"
16+
exit 1
17+
}

0 commit comments

Comments
 (0)