You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/05/24 16:34:03 UTC

[GitHub] [incubator-openwhisk-release] rabbah commented on a change in pull request #283: Small enhancements to rcverify.sh

rabbah commented on a change in pull request #283: Small enhancements to rcverify.sh
URL: https://github.com/apache/incubator-openwhisk-release/pull/283#discussion_r287433924
 
 

 ##########
 File path: tools/rcverify.sh
 ##########
 @@ -139,16 +139,24 @@ printf "verifing notice..."
 NTXT=$(cat "$DIR/$BASE/NOTICE.txt")
 validate "$NOTICE" "$NTXT" "cat '$DIR/$BASE/NOTICE.txt'"
 
+# If a project bundles any dependencies, there will be additional
+# text appended to LICENSE.txt to summarize the additional licenses.
+# Therefore only enforce a prefix match between the project's
+# LICENSE.txt and the official text of the Apache LICENSE-2.0.
 printf "verifying license..."
 curl http://www.apache.org/licenses/LICENSE-2.0 -s -o "$DIR/LICENSE-2.0"
-## this is a more forgiving license check that allows for the copyright line to be filled out
-#CMD="diff '$DIR/$BASE/LICENSE.txt' '$DIR/LICENSE-2.0' -I '^   Copyright'"
-CMD="diff '$DIR/$BASE/LICENSE.txt' '$DIR/LICENSE-2.0'"
-DIF=$(eval "$CMD")
+LICENSE_LEN=$(wc -c "$DIR/LICENSE-2.0" | awk '{print $1}')
+CMD="cmp -n $LICENSE_LEN '$DIR/LICENSE-2.0' '$DIR/$BASE/LICENSE.txt'"
+CMP=$(eval "$CMD")
 validate $? 0 "$CMD"
 
 printf "verifying sources have proper headers..."
-CMD="'$DIR/incubator-openwhisk-utilities/scancode/scanCode.py' --config '$DIR/incubator-openwhisk-utilities/scancode/ASF-Release.cfg' '$DIR/$BASE'"
+if [ -f '$DIR/$BASE/tools/travis/scancodeExlusions' ]; then
+    SCANCODE_EXTRA_ARGS="--gitignore '$DIR/$BASE/tools/travis/scancodeExclusions'"
 
 Review comment:
   i dont remember who i implemented the gitignore support in scancode - there may be an assumption that exclusions are relative to the root of the project. (will have to check to remind myself.)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services