Skip to content

Commit 35e2949

Browse files
authored
fix: retain licenses in source archives (#364)
1 parent 38adc82 commit 35e2949

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎.gitattributes‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
.github/ export-ignore
99
computer/computer-k8s-operator/crd-generate/bin/ export-ignore
1010
computer/computer-dist/scripts/ export-ignore
11-
computer/computer-dist/release-docs/ export-ignore

‎.github/workflows/computer-ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ on:
66
- master
77
- release-*
88
paths:
9+
- .gitattributes
910
- computer/**
1011
- .github/workflows/computer-ci.yml
1112
pull_request:
1213
paths:
14+
- .gitattributes
1315
- computer/**
1416
- .github/workflows/computer-ci.yml
1517
concurrency:

‎.github/workflows/license-checker.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ jobs:
2929
log: info
3030
config: .licenserc.yaml
3131

32+
- name: Check source archive licenses
33+
shell: bash
34+
run: |
35+
git -C .. archive HEAD | tar -tf - > "$RUNNER_TEMP/computer-source-files.txt"
36+
grep -Fx 'computer/computer-dist/release-docs/LICENSE' "$RUNNER_TEMP/computer-source-files.txt"
37+
grep -Fx 'computer/computer-dist/release-docs/NOTICE' "$RUNNER_TEMP/computer-source-files.txt"
38+
grep -E '^computer/computer-dist/release-docs/licenses/(.*/)?LICENSE[^/]*$' \
39+
"$RUNNER_TEMP/computer-source-files.txt"
40+
3241
- uses: actions/setup-java@v4
3342
with:
3443
java-version: '17'

0 commit comments

Comments
 (0)