mirror of
https://github.com/octoleo/restic.git
synced 2024-11-30 16:53:59 +00:00
Merge pull request #471 from fawick/move-cmd-folders
Refactor src/restic/cmd to src/cmds
This commit is contained in:
commit
6c9170da51
12
build.go
12
build.go
@ -329,13 +329,17 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
verbosePrintf("create GOPATH at %v\n", gopath)
|
verbosePrintf("create GOPATH at %v\n", gopath)
|
||||||
if err = updateGopath(gopath, filepath.Join(root, "src"), ""); err != nil {
|
if err = updateGopath(gopath, filepath.Join(root, "src", "restic"), "restic"); err != nil {
|
||||||
die("copying files from %v to %v failed: %v\n", root, gopath, err)
|
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")
|
vendor := filepath.Join(root, "vendor", "src")
|
||||||
if err = updateGopath(gopath, vendor, ""); err != nil {
|
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() {
|
defer func() {
|
||||||
@ -372,7 +376,7 @@ func main() {
|
|||||||
args := []string{
|
args := []string{
|
||||||
"-tags", strings.Join(buildTags, " "),
|
"-tags", strings.Join(buildTags, " "),
|
||||||
"-ldflags", ldflags,
|
"-ldflags", ldflags,
|
||||||
"-o", output, "restic/cmd/restic",
|
"-o", output, "cmds/restic",
|
||||||
}
|
}
|
||||||
|
|
||||||
err = build(filepath.Join(gopath, "src"), gopath, args...)
|
err = build(filepath.Join(gopath, "src"), gopath, args...)
|
||||||
|
@ -171,7 +171,7 @@ func (env *TravisEnvironment) RunTests() {
|
|||||||
"-arch", strings.Join(env.goxArch, " "),
|
"-arch", strings.Join(env.goxArch, " "),
|
||||||
"-tags", tags,
|
"-tags", tags,
|
||||||
"-output", "/tmp/{{.Dir}}_{{.OS}}_{{.Arch}}",
|
"-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
|
// run the tests and gather coverage information
|
||||||
runWithEnv(envWithGOPATH, "gotestcover", "-coverprofile", "all.cov", "restic/...")
|
runWithEnv(envWithGOPATH, "gotestcover", "-coverprofile", "all.cov", "cmds/...", "restic/...")
|
||||||
|
|
||||||
runGofmt()
|
runGofmt()
|
||||||
|
|
||||||
|
@ -724,7 +724,7 @@ func TestFind(t *testing.T) {
|
|||||||
|
|
||||||
func TestRebuildIndex(t *testing.T) {
|
func TestRebuildIndex(t *testing.T) {
|
||||||
withTestEnvironment(t, func(env *testEnvironment, global GlobalOptions) {
|
withTestEnvironment(t, func(env *testEnvironment, global GlobalOptions) {
|
||||||
datafile := filepath.Join("..", "..", "checker", "testdata", "duplicate-packs-in-index-test-repo.tar.gz")
|
datafile := filepath.Join("..", "..", "restic", "checker", "testdata", "duplicate-packs-in-index-test-repo.tar.gz")
|
||||||
SetupTarTestFixture(t, env.base, datafile)
|
SetupTarTestFixture(t, env.base, datafile)
|
||||||
|
|
||||||
out := cmdCheckOutput(t, global)
|
out := cmdCheckOutput(t, global)
|
||||||
@ -755,7 +755,7 @@ var optimizeTests = []struct {
|
|||||||
snapshots backend.IDSet
|
snapshots backend.IDSet
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
filepath.Join("..", "..", "checker", "testdata", "checker-test-repo.tar.gz"),
|
filepath.Join("..", "..", "restic", "checker", "testdata", "checker-test-repo.tar.gz"),
|
||||||
backend.NewIDSet(ParseID("a13c11e582b77a693dd75ab4e3a3ba96538a056594a4b9076e4cacebe6e06d43")),
|
backend.NewIDSet(ParseID("a13c11e582b77a693dd75ab4e3a3ba96538a056594a4b9076e4cacebe6e06d43")),
|
||||||
},
|
},
|
||||||
{
|
{
|
Loading…
Reference in New Issue
Block a user