Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
Temp work around to fix issue with LICENSE files.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
michaeltrobinson authored and Edward Muller committed Nov 17, 2015
1 parent e9ac6d7 commit 5e3d21a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v29 2015/11/17

* Temp work around to fix issue with LICENSE files.

# v28 2015/11/09

* Make `version` an actual command.
Expand Down
2 changes: 1 addition & 1 deletion save.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions save_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
},
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
)

const version = 28
const version = 29

var cmdVersion = &Command{
Usage: "version",
Expand Down

0 comments on commit 5e3d21a

Please sign in to comment.