fixed: prepare release and fixed license and notice end year
diff --git a/Makefile b/Makefile
index 3a54845..8f5e5e2 100644
--- a/Makefile
+++ b/Makefile
@@ -71,4 +71,4 @@
@echo "build demo-api successfully 👌\n"
interpret-jar:build-demo-api
- ts-node ./packages/interpret-cli/src/cli.ts interpret -c dubbo.json
\ No newline at end of file
+ ts-node ./packages/interpret-cli/src/cli.ts interpret -c dubbo.json
diff --git a/NOTICE b/NOTICE
index 67ea967..45c8ee2 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache Dubbo Js
-Copyright 2018-2022 The Apache Software Foundation
+Copyright 2018-2021 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/appveyor.yml b/appveyor.yml
index 2d0879a..d713a92 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,17 +1,17 @@
# 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
+# 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
+# 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.
+# 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.
environment:
matrix:
diff --git a/dubbo-java/dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties b/dubbo-java/dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties
index 62fe8a7..d7c64ca 100644
--- a/dubbo-java/dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties
+++ b/dubbo-java/dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties
@@ -1,17 +1,17 @@
# 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
+# 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
+# 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.
+# 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.
##
dubbo.container=log4j,spring
diff --git a/dubbo-java/dubbo-demo/dubbo-demo-consumer/src/main/resources/log4j.properties b/dubbo-java/dubbo-demo/dubbo-demo-consumer/src/main/resources/log4j.properties
index f6e3c60..f545479 100644
--- a/dubbo-java/dubbo-demo/dubbo-demo-consumer/src/main/resources/log4j.properties
+++ b/dubbo-java/dubbo-demo/dubbo-demo-consumer/src/main/resources/log4j.properties
@@ -1,17 +1,18 @@
# 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
+# 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
+# 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.
+# 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.
+
###set log levels###
log4j.rootLogger=info, stdout
diff --git a/dubbo-java/dubbo-demo/dubbo-demo-provider-with-nacos/src/main/assembly/conf/dubbo.properties b/dubbo-java/dubbo-demo/dubbo-demo-provider-with-nacos/src/main/assembly/conf/dubbo.properties
index d32dfc1..1f4ab4a 100644
--- a/dubbo-java/dubbo-demo/dubbo-demo-provider-with-nacos/src/main/assembly/conf/dubbo.properties
+++ b/dubbo-java/dubbo-demo/dubbo-demo-provider-with-nacos/src/main/assembly/conf/dubbo.properties
@@ -1,24 +1,11 @@
# 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
+# 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.
-
-# Copyright 1999-2018 Alibaba Group Holding Ltd.
-# Licensed 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
+# 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,
@@ -26,21 +13,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# 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
#
-# 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
#
-# 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.
+# 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.
##
dubbo.container=log4j,spring
diff --git a/dubbo-java/dubbo-demo/dubbo-demo-provider-with-nacos/src/main/resources/log4j.properties b/dubbo-java/dubbo-demo/dubbo-demo-provider-with-nacos/src/main/resources/log4j.properties
index 7446a02..906f7e1 100644
--- a/dubbo-java/dubbo-demo/dubbo-demo-provider-with-nacos/src/main/resources/log4j.properties
+++ b/dubbo-java/dubbo-demo/dubbo-demo-provider-with-nacos/src/main/resources/log4j.properties
@@ -1,24 +1,11 @@
# 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
+# 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.
-
-# Copyright 1999-2018 Alibaba Group Holding Ltd.
-# Licensed 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
+# 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,
@@ -26,22 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-# 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.
-
###set log levels###
log4j.rootLogger=info, stdout
###输出到控制台###
diff --git a/dubbo-java/dubbo-demo/dubbo-demo-provider-with-zookeeper/src/main/assembly/conf/dubbo.properties b/dubbo-java/dubbo-demo/dubbo-demo-provider-with-zookeeper/src/main/assembly/conf/dubbo.properties
index af29714..f1056a6 100644
--- a/dubbo-java/dubbo-demo/dubbo-demo-provider-with-zookeeper/src/main/assembly/conf/dubbo.properties
+++ b/dubbo-java/dubbo-demo/dubbo-demo-provider-with-zookeeper/src/main/assembly/conf/dubbo.properties
@@ -1,24 +1,11 @@
# 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
+# 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.
-
-# Copyright 1999-2018 Alibaba Group Holding Ltd.
-# Licensed 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
+# 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,
@@ -26,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
##
dubbo.container=log4j,spring
dubbo.application.name=demo-provider
diff --git a/dubbo-java/dubbo-demo/dubbo-demo-provider-with-zookeeper/src/main/resources/log4j.properties b/dubbo-java/dubbo-demo/dubbo-demo-provider-with-zookeeper/src/main/resources/log4j.properties
index 592c1b8..f5f9ead 100644
--- a/dubbo-java/dubbo-demo/dubbo-demo-provider-with-zookeeper/src/main/resources/log4j.properties
+++ b/dubbo-java/dubbo-demo/dubbo-demo-provider-with-zookeeper/src/main/resources/log4j.properties
@@ -1,24 +1,11 @@
# 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
+# 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.
-
-# Copyright 1999-2018 Alibaba Group Holding Ltd.
-# Licensed 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
+# 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,
diff --git a/dubbo-java/dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties b/dubbo-java/dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties
index d32dfc1..884b2ea 100644
--- a/dubbo-java/dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties
+++ b/dubbo-java/dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties
@@ -1,24 +1,11 @@
# 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
+# 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.
-
-# Copyright 1999-2018 Alibaba Group Holding Ltd.
-# Licensed 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
+# 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,
@@ -26,33 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-# 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.
-
-##
-dubbo.container=log4j,spring
-dubbo.application.name=demo-provider
-dubbo.application.owner=
-dubbo.registry.address=multicast://224.5.6.7:1234
-#dubbo.registry.address=zookeeper://127.0.0.1:2181
-#dubbo.registry.address=redis://127.0.0.1:6379
-#dubbo.registry.address=dubbo://127.0.0.1:9090
-dubbo.monitor.protocol=registry
-dubbo.protocol.name=dubbo
-dubbo.protocol.port=20880
-dubbo.service.loadbalance=roundrobin
-dubbo.log4j.file=logs/dubbo-demo-provider.log
+
+##
+dubbo.container=log4j,spring
+dubbo.application.name=demo-provider
+dubbo.application.owner=
+dubbo.registry.address=multicast://224.5.6.7:1234
+#dubbo.registry.address=zookeeper://127.0.0.1:2181
+#dubbo.registry.address=redis://127.0.0.1:6379
+#dubbo.registry.address=dubbo://127.0.0.1:9090
+dubbo.monitor.protocol=registry
+dubbo.protocol.name=dubbo
+dubbo.protocol.port=20880
+dubbo.service.loadbalance=roundrobin
+dubbo.log4j.file=logs/dubbo-demo-provider.log
dubbo.log4j.level=WARN
\ No newline at end of file
diff --git a/dubbo-java/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.properties b/dubbo-java/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.properties
index f6e3c60..f545479 100644
--- a/dubbo-java/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.properties
+++ b/dubbo-java/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.properties
@@ -1,17 +1,18 @@
# 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
+# 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
+# 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.
+# 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.
+
###set log levels###
log4j.rootLogger=info, stdout
diff --git a/dubbo-java/etcd-docker/docker-compose.yml b/dubbo-java/etcd-docker/docker-compose.yml
index 3bb5064..b0ac754 100644
--- a/dubbo-java/etcd-docker/docker-compose.yml
+++ b/dubbo-java/etcd-docker/docker-compose.yml
@@ -1,17 +1,17 @@
# 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
+# 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
+# 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.
+# 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.
version: '3'
networks:
diff --git a/dubbo-java/nacos-docker/build/bin/docker-startup.sh b/dubbo-java/nacos-docker/build/bin/docker-startup.sh
index a6411ed..cfbcf23 100755
--- a/dubbo-java/nacos-docker/build/bin/docker-startup.sh
+++ b/dubbo-java/nacos-docker/build/bin/docker-startup.sh
@@ -1,17 +1,18 @@
# 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
+# 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
+# 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.
+# 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.
+
#!/bin/bash
diff --git a/dubbo-java/nacos-docker/build/conf/application.properties b/dubbo-java/nacos-docker/build/conf/application.properties
index 4cfeb64..79178e1 100644
--- a/dubbo-java/nacos-docker/build/conf/application.properties
+++ b/dubbo-java/nacos-docker/build/conf/application.properties
@@ -1,24 +1,11 @@
# 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
+# 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.
-
-# Copyright 1999-2018 Alibaba Group Holding Ltd.
-# Licensed 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
+# 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,
@@ -26,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
+
# spring
serverNacos.servlet.contextPath=${SERVER_SERVLET_CONTEXTPATH:/nacos}
serverNacos.contextPath=/nacos
diff --git a/dubbo-java/nacos-docker/build/init.d/custom.properties b/dubbo-java/nacos-docker/build/init.d/custom.properties
index 62d64f3..23a7ed4 100644
--- a/dubbo-java/nacos-docker/build/init.d/custom.properties
+++ b/dubbo-java/nacos-docker/build/init.d/custom.properties
@@ -1,24 +1,11 @@
# 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
+# 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.
-
-# Copyright 1999-2018 Alibaba Group Holding Ltd.
-# Licensed 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
+# 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,
@@ -26,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
#spring.security.enabled=false
#management.security=false
#security.basic.enabled=false
diff --git a/dubbo-java/nacos-docker/example/init.d/custom.properties b/dubbo-java/nacos-docker/example/init.d/custom.properties
index bfe18fe..c37dbfa 100644
--- a/dubbo-java/nacos-docker/example/init.d/custom.properties
+++ b/dubbo-java/nacos-docker/example/init.d/custom.properties
@@ -1,24 +1,11 @@
# 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
+# 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.
-
-# Copyright 1999-2018 Alibaba Group Holding Ltd.
-# Licensed 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
+# 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,
@@ -26,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
#spring.security.enabled=false
#management.security=false
#security.basic.enabled=false
diff --git a/dubbo-java/start-etcd-dubbo-service.sh b/dubbo-java/start-etcd-dubbo-service.sh
index dc79614..02a6439 100755
--- a/dubbo-java/start-etcd-dubbo-service.sh
+++ b/dubbo-java/start-etcd-dubbo-service.sh
@@ -1,17 +1,18 @@
# 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
+# 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
+# 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.
+# 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.
+
#!/usr/bin/env sh
diff --git a/dubbo-java/start-nacos-dubbo-service.sh b/dubbo-java/start-nacos-dubbo-service.sh
index 15216bf..539640b 100755
--- a/dubbo-java/start-nacos-dubbo-service.sh
+++ b/dubbo-java/start-nacos-dubbo-service.sh
@@ -1,17 +1,17 @@
# 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
+# 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
+# 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.
+# 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.
#!/usr/bin/env sh
diff --git a/dubbo-java/start-nacos.sh b/dubbo-java/start-nacos.sh
index 5eb64ff..211fd1d 100755
--- a/dubbo-java/start-nacos.sh
+++ b/dubbo-java/start-nacos.sh
@@ -1,4 +1,19 @@
# 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.
+
+# 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
diff --git a/dubbo-java/start-zookeeper-dubbo-service.sh b/dubbo-java/start-zookeeper-dubbo-service.sh
index 1360fa7..f3fae9e 100755
--- a/dubbo-java/start-zookeeper-dubbo-service.sh
+++ b/dubbo-java/start-zookeeper-dubbo-service.sh
@@ -1,17 +1,17 @@
# 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
+# 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
+# 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.
+# 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.
#!/usr/bin/env sh
diff --git a/dubbo-java/zookeeper-docker/docker-compose.yml b/dubbo-java/zookeeper-docker/docker-compose.yml
index cf3d461..bbdd24e 100644
--- a/dubbo-java/zookeeper-docker/docker-compose.yml
+++ b/dubbo-java/zookeeper-docker/docker-compose.yml
@@ -1,33 +1,17 @@
# 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
+# 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
+# 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.
-
-#
-# 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
+# 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.
version: '3.1'
diff --git a/examples/hello-egg/appveyor.yml b/examples/hello-egg/appveyor.yml
index 08b5eb8..f9156da 100644
--- a/examples/hello-egg/appveyor.yml
+++ b/examples/hello-egg/appveyor.yml
@@ -1,17 +1,17 @@
# 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
+# 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
+# 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.
+# 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.
environment:
matrix:
diff --git a/examples/hello-midway/appveyor.yml b/examples/hello-midway/appveyor.yml
index 1b9ecf0..6126795 100644
--- a/examples/hello-midway/appveyor.yml
+++ b/examples/hello-midway/appveyor.yml
@@ -1,17 +1,17 @@
# 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
+# 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
+# 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.
+# 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.
environment:
matrix:
diff --git a/scripts/feature/check-license.ts b/scripts/command/check-license.ts
similarity index 85%
rename from scripts/feature/check-license.ts
rename to scripts/command/check-license.ts
index de43462..358d868 100644
--- a/scripts/feature/check-license.ts
+++ b/scripts/command/check-license.ts
@@ -21,7 +21,7 @@
import chalk from 'chalk'
import prettier from 'prettier'
-const prettierConfig = fs.readJSONSync('../.prettierrc')
+const prettierConfig = fs.readJSONSync('.prettierrc')
const LICENSE = `/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -41,19 +41,19 @@
*/`
const SHELL_LICENSE = `# 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
+# 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
+# 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.`
+# 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.`
const XML_LICENSE = `<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -145,9 +145,9 @@
function globFiles(): Promise<Array<string>> {
return new Promise((resolve, reject) => {
glob(
- '../**/*[!.d].+(ts|java|js|sh|xml|yml|properties)',
+ '**/*[!.d].+(ts|java|js|sh|xml|yml|properties)',
{
- ignore: ['../**/node_modules/**', '../**/lib/**', '../**/target/**']
+ ignore: ['**/node_modules/**', '**/lib/**', '**/target/**']
},
(err, files) => {
if (err) {
diff --git a/scripts/feature/prepare-release.ts b/scripts/command/prepare-release.ts
similarity index 70%
rename from scripts/feature/prepare-release.ts
rename to scripts/command/prepare-release.ts
index 1bc4af1..6b98da5 100644
--- a/scripts/feature/prepare-release.ts
+++ b/scripts/command/prepare-release.ts
@@ -15,12 +15,38 @@
* limitations under the License.
*/
-import fs from 'fs-extra'
-import chalk, { stderr } from 'chalk'
-import { checkLicense } from './check-license'
import { join } from 'path'
import { exec } from 'child_process'
+import fs from 'fs-extra'
+import chalk from 'chalk'
import pkg from '../../package.json'
+import { checkLicense } from './check-license'
+import checkNotice from '../feature/check-notice'
+import checkCopyright from '../feature/check-copyright'
+
+const log = (str: string) => console.log(chalk.greenBright(str))
+const logErr = (err: Error | string) => console.log(chalk.redBright(err))
+const sh = (str: TemplateStringsArray, ...keys: Array<string>) => {
+ const shell = str.reduce((r, v, i) => {
+ r += v
+ if (i < keys.length) {
+ r += keys[i]
+ }
+ return r
+ }, '')
+ return new Promise((resolve, reject) => {
+ log(`run shell => \n${shell}`)
+ exec(shell, (err, stdout, stderr) => {
+ if (err) {
+ reject(err)
+ return
+ }
+ log(stdout)
+ logErr(stderr)
+ resolve(stdout || stderr)
+ })
+ })
+}
/**
* source code release, auto pipeline
@@ -31,20 +57,34 @@
*/
export async function prepareRelease(dest: string) {
- console.log(chalk.greenBright(`- check license`))
- // check license
- const noLicenseFiles = await checkLicense()
- if (noLicenseFiles.length > 0) {
+ log(`current cwd ${process.cwd()}`)
+ log(`- check notice year`)
+ const err = checkNotice()
+ if (err) {
+ logErr(err)
+ return
+ }
+
+ log(`- check license`)
+ const loseLicenseFiles = await checkLicense()
+ if (loseLicenseFiles.length > 0) {
+ return
+ }
+
+ log(`- check copyright`)
+ const problem = await checkCopyright()
+ if (problem.length > 0) {
+ logErr(problem.join(','))
return
}
// copy current project to dest dir
const outputDir = join(dest, 'dubbo-js')
- console.log(chalk.greenBright(`\n- export dubbo-js to ${outputDir} dir`))
- fs.copySync('../', outputDir)
+ log(`\n- export dubbo-js => ${outputDir} dir`)
+ fs.copySync('.', outputDir)
// clean each module lib
- console.log(chalk.greenBright(`\n- clean node_modules`))
+ log(`\n- clean node_modules`)
await sh`
cd ${outputDir}
lerna clean -y
@@ -52,14 +92,14 @@
`
// clean .git
- console.log(chalk.greenBright(`\n- clean .git`))
+ log(`\n- clean .git`)
await sh`
cd ${outputDir}
rm -rf .git
`
// clean __MACOSX and .DS_Store
- console.log(chalk.greenBright(`\n- clean __MACOSX and .DS_Store`))
+ log(`\n- clean __MACOSX and .DS_Store`)
await sh`
cd ${outputDir}
find . | grep .DS_Store | xargs rm
@@ -67,14 +107,14 @@
`
// clean java target class
- console.log(chalk.greenBright(`\n- clean dubbo-demo`))
+ log(`\n- clean dubbo-demo`)
await sh`
cd ${outputDir}/dubbo-java/dubbo-demo
mvn clean
`
// clean example node_modules
- console.log(chalk.greenBright(`\n- clean example node_modules`))
+ log(`\n- clean example node_modules`)
await sh`
cd ${outputDir}
rm -rf fullstack/node_modules
@@ -84,7 +124,7 @@
`
// clean misc files
- console.log(chalk.greenBright(`\n- clean misc files`))
+ log(`\n- clean misc files`)
await sh`
cd ${outputDir}
rm package-lock.json
@@ -97,33 +137,12 @@
`
// zip source dir
- console.log(chalk.greenBright(`\n- zip dubbo-js dir`))
+ log(`\n- zip dubbo-js dir`)
await sh`
cd ${dest}
- zip -r apache-dubbo-js-${pkg.version}-source-release.zip ${outputDir}
+ zip -r apache-dubbo-js-${pkg.version}-source-release.zip dubbo-js
shasum -a 512 apache-dubbo-js-${pkg.version}-source-release.zip >> apache-dubbo-js-${pkg.version}-source-release.zip.sha512
gpg -ab apache-dubbo-js-${pkg.version}-source-release.zip
gpg --verify apache-dubbo-js-${pkg.version}-source-release.zip.asc apache-dubbo-js-${pkg.version}-source-release.zip
`
}
-
-function sh(str: TemplateStringsArray, ...keys: Array<string>) {
- const shell = str.reduce((r, v, i) => {
- r += v
- if (i < keys.length) {
- r += keys[i]
- }
- return r
- }, '')
- return new Promise((resolve, reject) => {
- console.log(chalk.greenBright(shell))
- exec(shell, (err, stdout, stderr) => {
- if (err) {
- reject(err)
- return
- }
- console.log(chalk.greenBright(stdout || stderr))
- resolve(stdout || stderr)
- })
- })
-}
diff --git a/scripts/feature/check-copyright.ts b/scripts/feature/check-copyright.ts
new file mode 100644
index 0000000..6757ff9
--- /dev/null
+++ b/scripts/feature/check-copyright.ts
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+import fs from 'fs-extra'
+import glob from 'glob'
+
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ util ~~~~~~~~~~~~~~~~~~~~~~~~~~
+const globFiles = (): Promise<Array<string>> => {
+ return new Promise((resolve, reject) => {
+ glob(
+ '**/*[!.d].+(ts|java|js|sh|xml|yml|properties)',
+ {
+ ignore: [
+ '**/node_modules/**',
+ '**/lib/**',
+ '**/target/**',
+ '**/check-copyright.ts'
+ ]
+ },
+ (err, files) => {
+ if (err) {
+ reject(err)
+ return
+ }
+ resolve(files)
+ }
+ )
+ })
+}
+
+export default async function checkCopyright() {
+ const files = await globFiles()
+ return (
+ await Promise.all(
+ files.map(async (file) => {
+ const content = (await fs.readFile(file)).toString()
+ if (
+ content.includes('Copyright 1999-2018 Alibaba Group Holding Ltd.')
+ ) {
+ return file
+ }
+ })
+ )
+ ).filter(Boolean)
+}
diff --git a/scripts/feature/check-notice.ts b/scripts/feature/check-notice.ts
new file mode 100644
index 0000000..506ddc1
--- /dev/null
+++ b/scripts/feature/check-notice.ts
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+import fs from 'fs-extra'
+
+export default function checkNotice() {
+ const notice = fs.readFileSync('NOTICE').toString()
+ const isMatch = /2018-(\d+)/.test(notice)
+ if (!isMatch) {
+ return new Error(`Could not find any date pattern`)
+ }
+
+ const [pattern, endYear] = notice.match(/2018-(\d+)/)
+ const year = new Date().getFullYear()
+ if (Number(endYear) !== year) {
+ return new Error(`notice ${pattern} end year ${endYear} != ${year}`)
+ }
+}
diff --git a/scripts/shipit.ts b/scripts/shipit.ts
index 70bd5fd..ff5098a 100644
--- a/scripts/shipit.ts
+++ b/scripts/shipit.ts
@@ -16,8 +16,8 @@
*/
import { Command } from 'commander'
-import { checkLicense, fixedFileLicense } from './feature/check-license'
-import { prepareRelease } from './feature/prepare-release'
+import { checkLicense, fixedFileLicense } from './command/check-license'
+import { prepareRelease } from './command/prepare-release'
const program = new Command()