You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by jo...@apache.org on 2020/03/28 05:59:40 UTC
[dubbo-go-hessian2] 01/01: add license checker
This is an automated email from the ASF dual-hosted git repository.
joezou pushed a commit to branch feature/AddLicenseChcker
in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git
commit 2c6c772d165562392ec99426f96c5915792dca51
Author: zouyixian <zo...@shein.com>
AuthorDate: Sat Mar 28 13:59:35 2020 +0800
add license checker
---
.travis.yml | 3 +++
before_validate_license.sh | 26 ++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 801cec3..4684042 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,5 +8,8 @@ script:
- mvn clean package -f test_hessian/pom.xml
- mvn clean package -f test_dubbo/pom.xml
- go fmt && [[ -z `git status -s` ]]
+ - sh before_validate_license.sh
+ - chmod u+x /tmp/tools/license/license-header-checker
+ - /tmp/tools/license/license-header-checker -v -a -r -i vendor /tmp/tools/license/license.txt . go && [[ -z `git status -s` ]]
- GO111MODULE=on && go mod vendor && go test -race && go test -bench . -race
diff --git a/before_validate_license.sh b/before_validate_license.sh
new file mode 100644
index 0000000..8fa6e38
--- /dev/null
+++ b/before_validate_license.sh
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+remoteLicenseCheckerPath="https://github.com/dubbogo/resources/raw/master/tools/license"
+remoteLicenseCheckerName="license-header-checker"
+remoteLicenseCheckerURL="${remoteLicenseCheckerPath}/${remoteLicenseCheckerName}"
+remoteLicenseName="license.txt"
+remoteLicenseURL="${remoteLicenseCheckerPath}/${remoteLicenseName}"
+
+licensePath="/tmp/tools/license"
+mkdir -p ${licensePath}
+wget -P "${licensePath}" ${remoteLicenseCheckerURL}
+wget -P "${licensePath}" ${remoteLicenseURL}