Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 6202123

Browse files
authored
updated license checker to handle shebang (#127)
Signed-off-by: awjh-ibm <[email protected]>
1 parent d7e3476 commit 6202123

File tree

19 files changed

+210
-411
lines changed

19 files changed

+210
-411
lines changed

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
#
14+
115
# Logs
216
logs
317
*.log

.travis/before-install.sh

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
215

316
# Exit on first error, print all commands.
417
set -ev

.travis/deploy.sh

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
215

316
# Exit on first error, print all commands.
417
set -ev

.travis/install.sh

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
215

316
# Exit on first error, print all commands.
417
set -ev

.travis/script.sh

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
215

316
# Exit on first error, print all commands.
417
set -ev

LICENSE

-201
This file was deleted.

LICENSE.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Licensed under the Apache License, Version 2.0 (the "License");
2+
you may not use this file except in compliance with the License.
3+
You may obtain a copy of the License at
4+
5+
http://www.apache.org/licenses/LICENSE-2.0
6+
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.

getTools.sh

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
215

316
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
417
mkdir ${DIR}/fabric-tools && cd ${DIR}/fabric-tools

info.js

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
114

215
'use strict'
316
var chalk = require('chalk');

package.json

+34-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
"preinstall": "npm install -g cordova",
99
"postinstall": "npm run pkgcheck && npm run bootstrap",
1010
"bootstrap": "git submodule init && git submodule update && lerna bootstrap",
11+
"pretest": "npm run licchk",
1112
"test": "lerna run test",
1213
"pkgcheck": "node ./scripts/pkgcheck.js",
1314
"pkgstamp": "node ./scripts/pkgstamp.js",
14-
"pkgbump": "node ./scripts/pkgbump.js && node ./scripts/pkgcheck.js --fix"
15+
"pkgbump": "node ./scripts/pkgbump.js && node ./scripts/pkgcheck.js --fix",
16+
"licchk": "license-check-and-add"
1517
},
1618
"dependencies": {
1719
"chalk": "^1.1.3",
@@ -22,10 +24,40 @@
2224
"colors": "^1.1.2",
2325
"lerna": "^2.0.0",
2426
"moment": "^2.18.1",
25-
"semver": "^5.4.1"
27+
"semver": "^5.4.1",
28+
"license-check-and-add": "~2.3.0"
2629
},
2730
"repository": {
2831
"type": "git",
2932
"url": "[email protected]:hyperledger/composer-sample-applications"
33+
},
34+
"license-check-and-add-config": {
35+
"folder": ".",
36+
"license": "LICENSE.txt",
37+
"exact_paths_method": "EXCLUDE",
38+
"exact_paths": [
39+
".git",
40+
"node_modules",
41+
"packages",
42+
".travis/fix_github_https_repo.sh"
43+
],
44+
"file_type_method": "EXCLUDE",
45+
"file_types": [
46+
".cfg",
47+
".enc",
48+
".log",
49+
".md",
50+
".yml"
51+
],
52+
"insert_license": false,
53+
"license_formats": {
54+
"js": {
55+
"prepend": "/*",
56+
"append": " */",
57+
"eachLine": {
58+
"prepend": " * "
59+
}
60+
}
61+
}
3062
}
3163
}

0 commit comments

Comments
 (0)