Improve package structure (#207)

* Improve package structure

* Set up travis
This commit is contained in:
Sung Won Cho 2019-06-25 19:20:19 +10:00 committed by GitHub
commit 23a511dbe0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
171 changed files with 4750 additions and 4531 deletions

View file

@ -54,19 +54,20 @@ agpl="/* Copyright (C) 2019 Monomax Software Pty Ltd
* along with Dnote. If not, see <https://www.gnu.org/licenses/>.
*/"
cliPath="$GOPATH"/src/github.com/dnote/dnote/cli
cliFiles=$(find "$cliPath" -type f -name "*.go" ! -path "**/vendor/*")
pkgPath="$GOPATH"/src/github.com/dnote/dnote/pkg
serverPath="$GOPATH"/src/github.com/dnote/dnote/pkg/server
for file in $cliFiles; do
pkgFiles=$(find "$pkgPath" -type f -name "*.go" ! -path "**/vendor/*" ! -path "$serverPath/*")
for file in $pkgFiles; do
remove_notice "$file"
add_notice "$file" "$gpl"
done
serverPath="$GOPATH"/src/github.com/dnote/dnote/server
webPath="$GOPATH"/src/github.com/dnote/dnote/web
agplFiles=$(find "$serverPath" "$webPath" -type f \( -name "*.go" -o -name "*.js" -o -name "*.scss" \) ! -path "**/vendor/*" ! -path "**/node_modules/*")
for file in $agplFiles; do
remove_notice "$file"
add_notice "$file" "$agpl"
done
webPath="$GOPATH"/src/github.com/dnote/dnote/web
agplFiles=$(find "$serverPath" "$webPath" -type f \( -name "*.go" -o -name "*.js" -o -name "*.scss" \) ! -path "**/vendor/*" ! -path "**/node_modules/*")
for file in $agplFiles; do
remove_notice "$file"
add_notice "$file" "$agpl"
done