Skip to content
Snippets Groups Projects
Commit 2bdea3f0 authored by Walter Lozano's avatar Walter Lozano
Browse files

apertis-pkg-merge-local: Add support for scan


It is common to need locally check for license scan issues, so add initial
support for it to the tooling.

Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent 5451267a
Branches 16.12
Tags apertis/0.1612.6 v0.1612.6
2 merge requests!103Backport v2025 <- v2026dev1: ci-license-scan: Add proposed whitelist,!101ci-license-scan: Add proposed whitelist
...@@ -67,6 +67,21 @@ diff_old() { ...@@ -67,6 +67,21 @@ diff_old() {
git diff $EXTRA_ARGS origin/$UPSTREAM_BRANCH_OLD origin/$DOWNSTREAM_BRANCH_OLD ':(exclude)debian/apertis' ':(exclude)debian/changelog' git diff $EXTRA_ARGS origin/$UPSTREAM_BRANCH_OLD origin/$DOWNSTREAM_BRANCH_OLD ':(exclude)debian/apertis' ':(exclude)debian/changelog'
} }
scan() {
if grep -q target debian/apertis/component
then
ci-license-scan --blacklist-licenses "GPL-3 GPL-3+ AGPL-3 AGPL-3+ AGPL-1 AGPL-1+ LGPL-3 LGPL-3+ BSD-4-Clause MPL-1.1" --fail-on-unknown --propose-whitelist
else
echo "Package does no belong to target, skipping"
fi
}
commit-whitelist() {
git add debian/apertis/copyright.whitelist
git commit -s -e -m 'copyright.whitelist: Update configuration'
}
release() { release() {
dch --force-distribution --distribution apertis --local +apertis --upstream Rebase on top of $UPSTREAM_BRANCH dch --force-distribution --distribution apertis --local +apertis --upstream Rebase on top of $UPSTREAM_BRANCH
git add debian/changelog git add debian/changelog
...@@ -92,11 +107,17 @@ diff) ...@@ -92,11 +107,17 @@ diff)
diff_old) diff_old)
diff_old diff_old
;; ;;
scan)
scan
;;
commit-whitelist)
commit-whitelist
;;
release) release)
release release
;; ;;
*) *)
echo Unknown command echo Unknown command
echo Usage `basename $0` '[merge|diff|diff_old|release]' echo Usage `basename $0` '[merge|diff|diff_old|scan|commit-whitelist|release]'
;; ;;
esac esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment