go-spirit

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

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"
		}
	}
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL