File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /dev *
2+ /work
3+ /graph
4+ /projects
Original file line number Diff line number Diff line change 1+ bobMinimumVersion : " 1.1.0"
2+ layers :
3+ - self
Original file line number Diff line number Diff line change 1+ ../../../
Original file line number Diff line number Diff line change 1+ root : true
2+ inherit : [licenses]
3+
4+ privateEnvironment :
5+ BASEMENT_ADD_LICENSE : " false"
6+
7+ packageScript : |
8+ expect_exist()
9+ {
10+ local i
11+ for i in "$@" ; do
12+ if [[ ! -e "$i" ]] ; then
13+ echo "Missing expected file: $i" >&2
14+ return 1
15+ fi
16+ done
17+ return 0
18+ }
19+
20+ expect_not_exist()
21+ {
22+ local i
23+ for i in "$@" ; do
24+ if [[ -e "$i" ]] ; then
25+ echo "Unexpected file: $i" >&2
26+ return 1
27+ fi
28+ done
29+
30+ return 0
31+ }
32+
33+ expect_content_equals () {
34+ if [[ "$(< $1)" != "$2" ]]; then
35+ echo "File \"$1\" doesn't contain \"$2\"" >&2
36+ return 1
37+ fi
38+ return 0
39+ }
40+
41+ multiPackage :
42+ pkg_license_missing :
43+ buildScript : |
44+ if licensesBuild; then
45+ echo "licensesBuild did not fail as expected!"
46+ exit 1
47+ fi
48+ packageScript : |
49+ licensesPackage
50+ expect_not_exist ".bob/license"
51+
52+ pkg_license_only :
53+ metaEnvironment :
54+ PKG_LICENSE : " GPLv3"
55+
56+ buildScript : |
57+ licensesBuild
58+ # simulate incremental builds...
59+ licensesBuild
60+ licensesBuild
61+
62+ packageScript : |
63+ licensesPackage
64+ expect_exist ".bob/license"
65+ expect_content_equals ".bob/license" "${PKG_LICENSE}"
66+
67+ pkg_license_refs :
68+ metaEnvironment :
69+ PKG_LICENSE : " GPLv3 OR LicenseRef-a AND LicenseRef-test12.3-4 WITH Foo"
70+ PKG_LICENSE_PATH : |
71+ a:license_a.txt
72+ test12.3-4:test/test-lic
73+
74+ checkoutDeterministic : True
75+ checkoutScript : |
76+ echo "Text of license_a" > license_a.txt
77+ mkdir -p test
78+ echo "Text of test" > test/test-lic
79+
80+ buildScript : |
81+ licensesBuild
82+
83+ packageScript : |
84+ licensesPackage
85+ expect_exist ".bob/license"
86+ expect_content_equals ".bob/license" "${PKG_LICENSE}"
87+ expect_exist ".bob/licenses/a" ".bob/licenses/test12.3-4"
88+ expect_content_equals ".bob/licenses/a" "Text of license_a"
89+ expect_content_equals ".bob/licenses/test12.3-4" "Text of test"
You can’t perform that action at this time.
0 commit comments