Skip to content

Commit

Permalink
[SCB-1538] add dependency licenses and better some docs (#45)
Browse files Browse the repository at this point in the history
* change Development Guide -> Development guide  and add start server instruction to docs

* add dependency licenses and change the build_binary.sh to add these licenses to binary package

* add one of miss license

* remove subcomponents license/notice infos from LICENSE/NOTICE file

* remove the duplication apache2.0 license

* revert build_binary.sh GO111MODULE modification

* seperate go-chassis licenses

* revert build_binary.sh GO111MODULE

* rename LICENSE_go-chassis_go-chassis to LICENSE_Apache2.0

* change LICENSE AND NOTICE for go-chassis version upgrade

* change the mispell seperate -> separate

* add context.Background() for shutdown method

* remove licenses/LICENSE and licenses/NOTICE from the binary package and change the path in LICENSE/NOTICE

* change LICENSE_Apache2.0 path in licenses/LICENSE

* change LICENSE file for apache license

* change NOTICE format and files
  • Loading branch information
alec-z authored and WillemJiang committed Oct 21, 2019
1 parent b4dc01d commit 4ad3617
Show file tree
Hide file tree
Showing 64 changed files with 3,059 additions and 10 deletions.
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -178,15 +179,15 @@
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 4 additions & 2 deletions build/build_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ EOM
}

writeConfig
cp ${PROJECT_DIR}/LICENSE ${PROJECT_DIR}/NOTICE ${release_dir}
cp ${PROJECT_DIR}/licenses/LICENSE ${PROJECT_DIR}/licenses/NOTICE ${release_dir}
cp -r ${PROJECT_DIR}/licenses ${release_dir}
rm -f ${release_dir}/licenses/LICENSE ${release_dir}/licenses/NOTICE
cd ${release_dir}
component="apache-servicecomb-kie"

Expand All @@ -92,7 +94,7 @@ buildAndPackage(){
echo "building & packaging ${GOOS} ${GOARCH}..."
GOOS=${GOOS} GOARCH=${GOARCH} go build -o ${release_dir}/kie github.com/apache/servicecomb-kie/cmd/kieserver
if [ $? -eq 0 ]; then
tar zcf "$component-$VERSION-${GOOS}-${GOARCH}.tar.gz" conf kie LICENSE NOTICE
tar zcf "$component-$VERSION-${GOOS}-${GOARCH}.tar.gz" conf kie LICENSE NOTICE licenses
else
echo -e "\033[31m build ${GOOS}-${GOARCH} fail !! \033[0m"
fi
Expand Down
9 changes: 5 additions & 4 deletions client/adaptor/kie_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package adaptor

import (
"context"
"encoding/json"
"fmt"
"github.com/apache/servicecomb-kie/pkg/model"
Expand Down Expand Up @@ -64,7 +65,7 @@ func TestKieClient_PullConfig(t *testing.T) {
//assert.Equal(t, resp.StatusCode, 404)
assert.Equal(t, err.Error(), "can not find value")
// Shutdown the helper server gracefully
if err := helper.Shutdown(nil); err != nil {
if err := helper.Shutdown(context.Background()); err != nil {
panic(err)
}
}
Expand All @@ -88,7 +89,7 @@ func TestKieClient_PullConfigs(t *testing.T) {
//assert.Equal(t, resp.StatusCode, 404)
assert.Equal(t, err.Error(), "can not find value")
// Shutdown the helper server gracefully
if err := helper.Shutdown(nil); err != nil {
if err := helper.Shutdown(context.Background()); err != nil {
panic(err)
}
}
Expand All @@ -114,7 +115,7 @@ func TestKieClient_PushConfigs(t *testing.T) {
//assert.Equal(t, resp.StatusCode, 404)
assert.Equal(t, err.Error(), "json: cannot unmarshal array into Go value of type model.KVDoc")
// Shutdown the helper server gracefully
if err := helper.Shutdown(nil); err != nil {
if err := helper.Shutdown(context.Background()); err != nil {
panic(err)
}
}
Expand All @@ -139,7 +140,7 @@ func TestKieClient_DeleteConfigs(t *testing.T) {
//assert.Equal(t, resp.StatusCode, 404)
assert.Equal(t, err.Error(), "delete 1 failed,http status [200 OK], body [[{\"label\":null,\"data\":null}]]")
// Shutdown the helper server gracefully
if err := helper.Shutdown(nil); err != nil {
if err := helper.Shutdown(context.Background()); err != nil {
panic(err)
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ make html
## Check the result

1. See html pages in _build folder

1. You can start a http server using `python -m http.server` which will serve at http://0.0.0.0:8000/.
2 changes: 1 addition & 1 deletion docs/development-guide.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Development Guide
Development guide
======================================

.. toctree::
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ require (
go.mongodb.org/mongo-driver v1.0.3
gopkg.in/yaml.v2 v2.2.1
)

go 1.13
19 changes: 19 additions & 0 deletions licenses/COPYING_alecthomas_units
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (C) 2014 Alec Thomas

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 4ad3617

Please sign in to comment.