mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
This commit is contained in:
parent
82afe73a9a
commit
41d037da1f
34
build.go
34
build.go
@ -49,6 +49,7 @@ var (
|
|||||||
cc string
|
cc string
|
||||||
debugBinary bool
|
debugBinary bool
|
||||||
timeout = "120s"
|
timeout = "120s"
|
||||||
|
gogoProtoVersion = "v1.2.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
type target struct {
|
type target struct {
|
||||||
@ -198,7 +199,7 @@ type dependencyRepo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dependencyRepos = []dependencyRepo{
|
var dependencyRepos = []dependencyRepo{
|
||||||
{path: "protobuf", repo: "https://github.com/gogo/protobuf.git", commit: "v1.2.0"},
|
{path: "protobuf", repo: "https://github.com/gogo/protobuf.git", commit: gogoProtoVersion},
|
||||||
{path: "xdr", repo: "https://github.com/calmh/xdr.git", commit: "08e072f9cb16"},
|
{path: "xdr", repo: "https://github.com/calmh/xdr.git", commit: "08e072f9cb16"},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,9 +254,6 @@ func main() {
|
|||||||
|
|
||||||
func runCommand(cmd string, target target) {
|
func runCommand(cmd string, target target) {
|
||||||
switch cmd {
|
switch cmd {
|
||||||
case "setup":
|
|
||||||
setup()
|
|
||||||
|
|
||||||
case "install":
|
case "install":
|
||||||
var tags []string
|
var tags []string
|
||||||
if noupgrade {
|
if noupgrade {
|
||||||
@ -335,33 +333,6 @@ func parseFlags() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
}
|
}
|
||||||
|
|
||||||
func setup() {
|
|
||||||
packages := []string{
|
|
||||||
"github.com/alecthomas/gometalinter",
|
|
||||||
"github.com/AlekSi/gocov-xml",
|
|
||||||
"github.com/axw/gocov/gocov",
|
|
||||||
"github.com/FiloSottile/gvt",
|
|
||||||
"golang.org/x/lint/golint",
|
|
||||||
"github.com/gordonklaus/ineffassign",
|
|
||||||
"github.com/mdempsky/unconvert",
|
|
||||||
"github.com/mitchellh/go-wordwrap",
|
|
||||||
"github.com/opennota/check/cmd/...",
|
|
||||||
"github.com/tsenart/deadcode",
|
|
||||||
"golang.org/x/net/html",
|
|
||||||
"golang.org/x/tools/cmd/cover",
|
|
||||||
"honnef.co/go/tools/cmd/gosimple",
|
|
||||||
"honnef.co/go/tools/cmd/staticcheck",
|
|
||||||
"honnef.co/go/tools/cmd/unused",
|
|
||||||
"github.com/josephspurrier/goversioninfo",
|
|
||||||
}
|
|
||||||
for _, pkg := range packages {
|
|
||||||
fmt.Println(pkg)
|
|
||||||
runPrint(goCmd, "get", "-u", pkg)
|
|
||||||
}
|
|
||||||
|
|
||||||
runPrint(goCmd, "install", "-v", "github.com/syncthing/syncthing/vendor/github.com/gogo/protobuf/protoc-gen-gogofast")
|
|
||||||
}
|
|
||||||
|
|
||||||
func test(pkgs ...string) {
|
func test(pkgs ...string) {
|
||||||
lazyRebuildAssets()
|
lazyRebuildAssets()
|
||||||
|
|
||||||
@ -761,6 +732,7 @@ func shouldRebuildAssets(target, srcdir string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func proto() {
|
func proto() {
|
||||||
|
runPrint(goCmd, "get", fmt.Sprintf("github.com/gogo/protobuf/protoc-gen-gogofast@%v", gogoProtoVersion))
|
||||||
os.MkdirAll("repos", 0755)
|
os.MkdirAll("repos", 0755)
|
||||||
for _, dep := range dependencyRepos {
|
for _, dep := range dependencyRepos {
|
||||||
path := filepath.Join("repos", dep.path)
|
path := filepath.Join("repos", dep.path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user