Commit 5e3d21ab authored by Michael Robinson's avatar Michael Robinson Committed by Edward Muller
Browse files

Temp work around to fix issue with LICENSE files.

Fixed issue where LICENSE files within dependencies vendor directories
would be re-vendored, resulting in failing builds.

Added test case for legal files within vendored directory
parent e9ac6d76
# v29 2015/11/17
* Temp work around to fix issue with LICENSE files.
# v28 2015/11/09
* Make `version` an actual command.
......
......@@ -316,7 +316,7 @@ func copySrc(dir string, deps []Dependency) error {
w = fs.Walk(rootdir)
for w.Step() {
fname := filepath.Base(w.Path())
if IsLegalFile(fname) {
if IsLegalFile(fname) && !strings.Contains(w.Path(), sep) {
err = copyPkgFile(vf, dir, srcdir, w)
if err != nil {
log.Println(err)
......
......@@ -1093,6 +1093,8 @@ func TestSave(t *testing.T) {
{"LICENSE", pkg("D"), nil},
{"P/main.go", pkg("P"), nil},
{"P/LICENSE", pkg("P"), nil},
{"Godeps/_workspace/src/E/LICENSE", pkg("E"), nil},
{"Godeps/_workspace/src/E/main.go", pkg("E"), nil},
{"Q/main.go", pkg("Q"), nil},
{"+git", "D1", nil},
},
......@@ -1104,6 +1106,7 @@ func TestSave(t *testing.T) {
{"C/Godeps/_workspace/src/D/P/main.go", pkg("P"), nil},
{"C/Godeps/_workspace/src/D/P/LICENSE", pkg("P"), nil},
{"C/Godeps/_workspace/src/D/Q/main.go", pkg("Q"), nil},
{"C/Godeps/_workspace/src/D/Godeps/_workspace/src/E/LICENSE", "(absent)", nil},
},
wdep: Godeps{
ImportPath: "C",
......
......@@ -5,7 +5,7 @@ import (
"runtime"
)
const version = 28
const version = 29
var cmdVersion = &Command{
Usage: "version",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment