Skip to content

Commit

Permalink
build: Remove outdated&non-functional setup command (fixes syncthing#…
Browse files Browse the repository at this point in the history
  • Loading branch information
imsodin committed Jan 14, 2019
1 parent b01edca commit de4df1c
Showing 1 changed file with 18 additions and 46 deletions.
64 changes: 18 additions & 46 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,22 @@ import (
)

var (
versionRe = regexp.MustCompile(`-[0-9]{1,3}-g[0-9a-f]{5,10}`)
goarch string
goos string
noupgrade bool
version string
goCmd string
goVersion float64
race bool
debug = os.Getenv("BUILDDEBUG") != ""
extraTags string
installSuffix string
pkgdir string
cc string
debugBinary bool
timeout = "120s"
versionRe = regexp.MustCompile(`-[0-9]{1,3}-g[0-9a-f]{5,10}`)
goarch string
goos string
noupgrade bool
version string
goCmd string
goVersion float64
race bool
debug = os.Getenv("BUILDDEBUG") != ""
extraTags string
installSuffix string
pkgdir string
cc string
debugBinary bool
timeout = "120s"
gogoProtoVersion = "v1.2.0"
)

type target struct {
Expand Down Expand Up @@ -198,7 +199,7 @@ type dependencyRepo struct {
}

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

Expand Down Expand Up @@ -253,9 +254,6 @@ func main() {

func runCommand(cmd string, target target) {
switch cmd {
case "setup":
setup()

case "install":
var tags []string
if noupgrade {
Expand Down Expand Up @@ -335,33 +333,6 @@ func parseFlags() {
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) {
lazyRebuildAssets()

Expand Down Expand Up @@ -761,6 +732,7 @@ func shouldRebuildAssets(target, srcdir string) bool {
}

func proto() {
runPrint(goCmd, "get", fmt.Sprintf("github.com/gogo/protobuf/protoc-gen-gogofast@%v", gogoProtoVersion))
os.MkdirAll("repos", 0755)
for _, dep := range dependencyRepos {
path := filepath.Join("repos", dep.path)
Expand Down

0 comments on commit de4df1c

Please sign in to comment.