Skip to content

Commit 013cfdc

Browse files
committed
fix: Root package reuse compliance
1 parent c4de1ba commit 013cfdc

File tree

3 files changed

+62
-3
lines changed

3 files changed

+62
-3
lines changed

.github/workflows/reuse-compliance.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ permissions: {}
1414
jobs:
1515
compliance-check:
1616
name: Compliance Check
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-24.04
1818
strategy:
1919
matrix:
2020
package:
21-
- "."
2221
- "packages/builder"
2322
- "packages/cli"
2423
- "packages/documentation"
@@ -28,6 +27,15 @@ jobs:
2827
- "packages/server"
2928
steps:
3029
- uses: actions/checkout@v5
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v6
33+
with:
34+
node-version: 22.20.0
35+
36+
- name: Execute REUSE Compliance Check for root package only
37+
run: ./scripts/check-root-reuse-compliance.sh
38+
3139
- name: Execute REUSE Compliance Check for ${{ matrix.package }}
3240
uses: fsfe/reuse-action@v6
3341
with:

REUSE.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version = 1
22
SPDX-PackageName = "ui5-cli"
33
SPDX-PackageSupplier = "SAP OpenUI5 <[email protected]>"
44
SPDX-PackageDownloadLocation = "https://github.com/UI5/cli"
5-
SPDX-PackageComment = "The code in this project may include calls to APIs ("API Calls") of\n SAP or third-party products or services developed outside of this project\n ("External Products").\n "APIs" means application programming interfaces, as well as their respective\n specifications and implementing code that allows software to communicate with\n other software.\n API Calls to External Products are not licensed under the open source license\n that governs this project. The use of such API Calls and related External\n Products are subject to applicable additional agreements with the relevant\n provider of the External Products. In no event shall the open source license\n that governs this project grant any rights in or to any External Products,or\n alter, expand or supersede any terms of the applicable additional agreements.\n If you have a valid license agreement with SAP for the use of a particular SAP\n External Product, then you may make use of any API Calls included in this\n project's code for that SAP External Product, subject to the terms of such\n license agreement. If you do not have a valid license agreement for the use of\n a particular SAP External Product, then you may only make use of any API Calls\n in this project for that SAP External Product for your internal, non-productive\n and non-commercial test and evaluation of such API Calls. Nothing herein grants\n you any rights to use or access any SAP External Product, or provide any third\n parties the right to use of access any SAP External Product, through API Calls."
5+
SPDX-PackageComment = "The code in this project may include calls to APIs (“API Calls”) of\n SAP or third-party products or services developed outside of this project\n (“External Products”).\n “APIs” means application programming interfaces, as well as their respective\n specifications and implementing code that allows software to communicate with\n other software.\n API Calls to External Products are not licensed under the open source license\n that governs this project. The use of such API Calls and related External\n Products are subject to applicable additional agreements with the relevant\n provider of the External Products. In no event shall the open source license\n that governs this project grant any rights in or to any External Products,or\n alter, expand or supersede any terms of the applicable additional agreements.\n If you have a valid license agreement with SAP for the use of a particular SAP\n External Product, then you may make use of any API Calls included in this\n project’s code for that SAP External Product, subject to the terms of such\n license agreement. If you do not have a valid license agreement for the use of\n a particular SAP External Product, then you may only make use of any API Calls\n in this project for that SAP External Product for your internal, non-productive\n and non-commercial test and evaluation of such API Calls. Nothing herein grants\n you any rights to use or access any SAP External Product, or provide any third\n parties the right to use of access any SAP External Product, through API Calls."
66

77
[[annotations]]
88
path = ["docs/**", "examples/**", "resources/**", "rfcs/**", "scripts/**", "site/**", ".github/**", ".husky/**", ".vscode/**"]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
# SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and UI5 CLI contributors
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# Script to check REUSE compliance for root files only (excluding packages folder)
7+
#
8+
# WHY THIS SCRIPT IS NEEDED:
9+
# Standard 'reuse lint' from the root folder scans the entire repository including packages/*,
10+
# but we have a scan for each package separately and here we want to check only the root-level files.
11+
12+
echo "🔍 Checking REUSE compliance for root workspace files (excluding packages)..."
13+
14+
CHECKED_FILES=0
15+
FAILED_FILES=0
16+
17+
# Function to check a single file
18+
check_file() {
19+
if npx reuse lint-file "$1" >/dev/null 2>&1; then
20+
return 0
21+
else
22+
FAILED_FILES=$((FAILED_FILES + 1))
23+
return 1
24+
fi
25+
}
26+
27+
# Get all root files (excluding packages directory)
28+
FILES=$(find . -maxdepth 1 -type f ! -name '.*' && \
29+
find .editorconfig .gitattributes .gitignore .licensee.json .npmrc 2>/dev/null && \
30+
find docs examples resources rfcs scripts site .github .husky .vscode LICENSES -type f 2>/dev/null)
31+
32+
# Check each file
33+
for file in $FILES; do
34+
check_file "$file"
35+
CHECKED_FILES=$((CHECKED_FILES + 1))
36+
done
37+
38+
# Summary
39+
echo ""
40+
echo "📊 Summary:"
41+
echo " Total files checked: $CHECKED_FILES"
42+
echo " Failed files: $FAILED_FILES"
43+
echo " Success rate: $(( (CHECKED_FILES - FAILED_FILES) * 100 / CHECKED_FILES ))%"
44+
45+
if [ $FAILED_FILES -eq 0 ]; then
46+
echo "🎉 All root workspace files are REUSE compliant!"
47+
exit 0
48+
else
49+
echo "$FAILED_FILES files failed REUSE compliance"
50+
exit 1
51+
fi

0 commit comments

Comments
 (0)