go-spirit
go-spirit is a tools for build spirit component
Install go-spirit
install
go get github.com/go-spirit/go-spirit
if do not install, please run
go install github.com/go-spirit/go-spirit
update
go get -u github.com/go-spirit/go-spirit
Run todo project
pull project source
> go-spirit pull --config build.conf
INFO[0000] fetched fetcher=goget revision=master url=github.com/spirit-component/examples/todo
INFO[0000] checkout fetcher=goget revision=master url=github.com/spirit-component/examples/todo
INFO[0000] fetched fetcher=goget revision=master url=github.com/spirit-component/postapi
INFO[0000] checkout fetcher=goget revision=master url=github.com/spirit-component/postapi
build project
go-spirit build --config build.conf
INFO[0000] building project=todo
build.conf
use goget fetcher
# project
todo {
# import packages
packages = ["github.com/spirit-component/examples/todo", "github.com/spirit-component/postapi"]
build-args = []
fetchers {
git {
gopath = ${GOPATH}
}
goget {
gopath = ${GOPATH}
}
}
# the dependencies
repos = {
todo {
fetcher = goget
args = ["-v"]
url = "github.com/spirit-component/examples/todo"
revision = master
}
postapi {
fetcher = goget
args = ["-v"]
url = "github.com/spirit-component/postapi"
revision = master
}
}
}
use git fetcher
# project
todo {
# import packages
packages = ["github.com/spirit-component/examples/todo", "github.com/spirit-component/postapi"]
build-args = []
fetchers {
git {
gopath = ${GOPATH}
}
goget {
gopath = ${GOPATH}
}
}
# the dependencies
repos = {
todo {
fetcher = git
args = {
clone = []
pull = []
}
url = "[email protected]:spirit-component/examples.git"
revision = master
dir = "github.com/spirit-component"
}
postapi {
fetcher = git
args = {
clone = []
pull = []
}
url = "[email protected]:spirit-component/postapi.git"
revision = master
dir = "github.com/spirit-component"
}
}
}