mirror of
https://github.com/octoleo/restic.git
synced 2024-11-25 06:07:44 +00:00
Use relocated command folders in build.go and run_integration_tests.go
The resulting command structure is almost compatible to that of that gb reference project (example-gsftp), as the subfolder for commands is 'cmds' instead of 'cmd'.
This commit is contained in:
parent
442780f214
commit
ee494ab939
12
build.go
12
build.go
@ -329,13 +329,17 @@ func main() {
|
||||
}
|
||||
|
||||
verbosePrintf("create GOPATH at %v\n", gopath)
|
||||
if err = updateGopath(gopath, filepath.Join(root, "src"), ""); err != nil {
|
||||
die("copying files from %v to %v failed: %v\n", root, gopath, err)
|
||||
if err = updateGopath(gopath, filepath.Join(root, "src", "restic"), "restic"); err != nil {
|
||||
die("copying files from %v/src/restic to %v/src/restic failed: %v\n", root, gopath, err)
|
||||
}
|
||||
|
||||
if err = updateGopath(gopath, filepath.Join(root, "src", "cmds"), "cmds"); err != nil {
|
||||
die("copying files from %v/src/cmds to %v/src/restic/cmds failed: %v\n", root, gopath, err)
|
||||
}
|
||||
|
||||
vendor := filepath.Join(root, "vendor", "src")
|
||||
if err = updateGopath(gopath, vendor, ""); err != nil {
|
||||
die("copying files from %v to %v failed: %v\n", root, gopath, err)
|
||||
die("copying files from %v to %v/src failed: %v\n", vendor, gopath, err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
@ -372,7 +376,7 @@ func main() {
|
||||
args := []string{
|
||||
"-tags", strings.Join(buildTags, " "),
|
||||
"-ldflags", ldflags,
|
||||
"-o", output, "restic/cmd/restic",
|
||||
"-o", output, "cmds/restic",
|
||||
}
|
||||
|
||||
err = build(filepath.Join(gopath, "src"), gopath, args...)
|
||||
|
@ -171,7 +171,7 @@ func (env *TravisEnvironment) RunTests() {
|
||||
"-arch", strings.Join(env.goxArch, " "),
|
||||
"-tags", tags,
|
||||
"-output", "/tmp/{{.Dir}}_{{.OS}}_{{.Arch}}",
|
||||
"restic/cmd/restic")
|
||||
"cmds/restic")
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ func (env *TravisEnvironment) RunTests() {
|
||||
}
|
||||
|
||||
// run the tests and gather coverage information
|
||||
runWithEnv(envWithGOPATH, "gotestcover", "-coverprofile", "all.cov", "restic/...")
|
||||
runWithEnv(envWithGOPATH, "gotestcover", "-coverprofile", "all.cov", "cmds/...", "restic/...")
|
||||
|
||||
runGofmt()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user