imbajin commented on code in PR #197:
URL:
https://github.com/apache/incubator-hugegraph-doc/pull/197#discussion_r1104598615
##########
.github/workflows/validate-release.yml:
##########
@@ -104,32 +108,41 @@ jobs:
if [[ ! -f "DISCLAIMER" ]]; then
echo "The package should include DISCLAIMER file" && exit 1
fi
+ # 4.2 ensure doesn't contains
*GPL/BCL/JSR-275/RSAL/QPL/SSPL/CPOL/NPL1.*/CC-BY
+ # dependency in LICENSE and NOTICE file
+ COUNT=$(grep -E "GPL|BCL|JSR-275|RSAL|QPL|SSPL|CPOL|NPL1|CC-BY"
LICENSE NOTICE | wc -l)
+ if [[ $COUNT -ne 0 ]]; then
+ grep -E "GPL|BCL|JSR-275|RSAL|QPL|SSPL|CPOL|NPL1.0|CC-BY"
LICENSE NOTICE
+ echo "The package shouldn't include GPL* invalid dependency, but
get $COUNT" && exit 1
+ fi
- # 4.2 ensure doesn't contains empty directory or file
+ # 4.3 ensure doesn't contains empty directory or file
COUNT=$(find . -type d -empty | wc -l)
if [[ $COUNT -ne 0 ]]; then
find . -type d -empty
- echo "The package shouldn't include empty directory, but get
$COUNT" # TODO: && exit 1
+ echo "The package shouldn't include empty directory, but get
$COUNT" && exit 1
fi
- # 4.3 ensure any file should less than 900kb & not include binary
file
+ # 4.4 ensure any file should less than 900kb & not include binary
file
COUNT=$(find . -type f -size +900k | wc -l)
if [[ $COUNT -ne 0 ]]; then
find . -type f -size +900k
- echo "The package shouldn't include file larger than 900kb, but
get $COUNT"
+ echo "The package shouldn't include file larger than 900kb, but
get $COUNT" && exit 1
fi
COUNT=$(find . -type f | perl -lne 'print if -B' | grep -v *.txt |
wc -l)
if [[ $COUNT -ne 0 ]]; then
find . -type f | perl -lne 'print if -B'
+ # due to the search script is not perfect, we can't exit here
(check manually)
echo "The package shouldn't include binary file, but get $COUNT"
Review Comment:
Find a critical problem here, we need exclude the files with a `white-list`
& exit here:
1. `*.txt` should be allowed, but why `grep -v *.txt` **doesn't work**?
2. exclude the file `/hugegraph-hubble/hubble-fe/src/assets/imgs/logo.png`
3. exclude the file `./hugegraph-hubble/hubble-fe/public/favicon.ico`
4. exclude the file `yarn.lock`
This is the **1st priority** we need to fix and enhance it
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]