From 6dbff6820dc0f42d58b218e627e52d7dd6ef7c16 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Thu, 17 Aug 2017 08:49:59 -0500 Subject: [PATCH 01/16] gps: source: drop convertToRevision sourceHasLatestLocally sourceGateway requirement; optimize sourceHasLatestVersionList check --- internal/gps/source.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/internal/gps/source.go b/internal/gps/source.go index d687a1b687..12bbcdea5c 100644 --- a/internal/gps/source.go +++ b/internal/gps/source.go @@ -402,7 +402,7 @@ func (sg *sourceGateway) convertToRevision(ctx context.Context, v Version) (Revi // The version list is out of date; it's possible this version might // show up after loading it. - _, err := sg.require(ctx, sourceIsSetUp|sourceHasLatestVersionList|sourceHasLatestLocally) + _, err := sg.require(ctx, sourceIsSetUp|sourceHasLatestVersionList) if err != nil { return "", err } @@ -507,14 +507,16 @@ func (sg *sourceGateway) require(ctx context.Context, wanted sourceState) (errSt } } case sourceHasLatestVersionList: - var pvl []PairedVersion - err = sg.suprvsr.do(ctx, sg.src.sourceType(), ctListVersions, func(ctx context.Context) error { - pvl, err = sg.src.listVersions(ctx) - return err - }) + if len(sg.cache.getAllVersions()) == 0 { + var pvl []PairedVersion + err = sg.suprvsr.do(ctx, sg.src.sourceType(), ctListVersions, func(ctx context.Context) error { + pvl, err = sg.src.listVersions(ctx) + return err + }) - if err == nil { - sg.cache.storeVersionMap(pvl, true) + if err == nil { + sg.cache.storeVersionMap(pvl, true) + } } case sourceHasLatestLocally: err = sg.suprvsr.do(ctx, sg.src.sourceType(), ctSourceFetch, func(ctx context.Context) error { From 39bdf9e4446b39d450904904b9c239a4e0540a20 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Fri, 18 Aug 2017 06:36:45 -0500 Subject: [PATCH 02/16] revert sourceHasLatestVersionList check; fix superviser.do name --- internal/gps/source.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/internal/gps/source.go b/internal/gps/source.go index edfb7bf5c6..bbced48ef7 100644 --- a/internal/gps/source.go +++ b/internal/gps/source.go @@ -361,7 +361,7 @@ func (sg *sourceGateway) listPackages(ctx context.Context, pr ProjectRoot, v Ver return pkgtree.PackageTree{}, err } - err = sg.suprvsr.do(ctx, label, ctGetManifestAndLock, func(ctx context.Context) error { + err = sg.suprvsr.do(ctx, label, ctListPackages, func(ctx context.Context) error { ptree, err = sg.src.listPackages(ctx, pr, r) return err }) @@ -507,16 +507,14 @@ func (sg *sourceGateway) require(ctx context.Context, wanted sourceState) (errSt } } case sourceHasLatestVersionList: - if len(sg.cache.getAllVersions()) == 0 { - var pvl []PairedVersion - err = sg.suprvsr.do(ctx, sg.src.sourceType(), ctListVersions, func(ctx context.Context) error { - pvl, err = sg.src.listVersions(ctx) - return err - }) + var pvl []PairedVersion + err = sg.suprvsr.do(ctx, sg.src.sourceType(), ctListVersions, func(ctx context.Context) error { + pvl, err = sg.src.listVersions(ctx) + return err + }) - if err == nil { - sg.cache.setVersionMap(pvl) - } + if err == nil { + sg.cache.setVersionMap(pvl) } case sourceHasLatestLocally: err = sg.suprvsr.do(ctx, sg.src.sourceType(), ctSourceFetch, func(ctx context.Context) error { From bb11ff769b68e93b101c26bb4842bb0ba9a13e25 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Sat, 3 Jun 2017 11:48:14 -0500 Subject: [PATCH 03/16] consolidate ProjectIndentifier sorts --- cmd/dep/status.go | 4 ++- internal/gps/constraints.go | 20 +++++---------- internal/gps/identifier.go | 4 +-- internal/gps/lock.go | 51 +++++++++++++------------------------ internal/gps/lock_test.go | 5 +++- internal/gps/lockdiff.go | 16 ++---------- internal/gps/solver.go | 4 +-- lock.go | 22 +++------------- 8 files changed, 39 insertions(+), 87 deletions(-) diff --git a/cmd/dep/status.go b/cmd/dep/status.go index 5f6829f357..6ad58fa70f 100644 --- a/cmd/dep/status.go +++ b/cmd/dep/status.go @@ -341,7 +341,9 @@ func runStatusAll(ctx *dep.Ctx, out outputter, p *dep.Project, sm gps.SourceMana // deterministically ordered. (This may be superfluous if the lock is always // written in alpha order, but it doesn't hurt to double down.) slp := p.Lock.Projects() - sort.Sort(dep.SortedLockedProjects(slp)) + sort.Slice(slp, func(i, j int) bool { + return slp[i].Ident().Less(slp[j].Ident()) + }) if bytes.Equal(s.HashInputs(), p.Lock.SolveMeta.InputsDigest) { // If these are equal, we're guaranteed that the lock is a transitively diff --git a/internal/gps/constraints.go b/internal/gps/constraints.go index d3d382a595..acc1f1d4da 100644 --- a/internal/gps/constraints.go +++ b/internal/gps/constraints.go @@ -331,7 +331,9 @@ func (m ProjectConstraints) asSortedSlice() []ProjectConstraint { k++ } - sort.Stable(sortedConstraints(pcs)) + sort.SliceStable(pcs, func(i, j int) bool { + return pcs[i].Ident.Less(pcs[j].Ident) + }) return pcs } @@ -348,7 +350,9 @@ func (m ProjectConstraints) overrideAll(pcm ProjectConstraints) (out []workingCo k++ } - sort.Stable(sortedWC(out)) + sort.SliceStable(out, func(i, j int) bool { + return out[i].Ident.Less(out[j].Ident) + }) return } @@ -389,15 +393,3 @@ func (m ProjectConstraints) override(pr ProjectRoot, pp ProjectProperties) worki return wc } - -type sortedConstraints []ProjectConstraint - -func (s sortedConstraints) Len() int { return len(s) } -func (s sortedConstraints) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s sortedConstraints) Less(i, j int) bool { return s[i].Ident.less(s[j].Ident) } - -type sortedWC []workingConstraint - -func (s sortedWC) Len() int { return len(s) } -func (s sortedWC) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s sortedWC) Less(i, j int) bool { return s[i].Ident.less(s[j].Ident) } diff --git a/internal/gps/identifier.go b/internal/gps/identifier.go index de24e88c34..a498302448 100644 --- a/internal/gps/identifier.go +++ b/internal/gps/identifier.go @@ -80,14 +80,14 @@ type ProjectIdentifier struct { Source string } -func (i ProjectIdentifier) less(j ProjectIdentifier) bool { +// Less compares by ProjectRoot then normalized Source. +func (i ProjectIdentifier) Less(j ProjectIdentifier) bool { if i.ProjectRoot < j.ProjectRoot { return true } if j.ProjectRoot < i.ProjectRoot { return false } - return i.normalizedSource() < j.normalizedSource() } diff --git a/internal/gps/lock.go b/internal/gps/lock.go index 661bf63dd2..e0c0794a05 100644 --- a/internal/gps/lock.go +++ b/internal/gps/lock.go @@ -39,20 +39,8 @@ func LocksAreEq(l1, l2 Lock, checkHash bool) bool { return false } - // Check if the slices are sorted already. If they are, we can compare - // without copying. Otherwise, we have to copy to avoid altering the - // original input. - sp1, sp2 := lpsorter(p1), lpsorter(p2) - if len(p1) > 1 && !sort.IsSorted(sp1) { - p1 = make([]LockedProject, len(p1)) - copy(p1, l1.Projects()) - sort.Sort(lpsorter(p1)) - } - if len(p2) > 1 && !sort.IsSorted(sp2) { - p2 = make([]LockedProject, len(p2)) - copy(p2, l2.Projects()) - sort.Sort(lpsorter(p2)) - } + p1 = sortedLockedProjects(p1) + p2 = sortedLockedProjects(p2) for k, lp := range p1 { if !lp.Eq(p2[k]) { @@ -62,6 +50,21 @@ func LocksAreEq(l1, l2 Lock, checkHash bool) bool { return true } +// sortedLockedProjects returns a sorted copy of lps, or itself if already sorted. +func sortedLockedProjects(lps []LockedProject) []LockedProject { + if len(lps) <= 1 || sort.SliceIsSorted(lps, func(i, j int) bool { + return lps[i].Ident().Less(lps[j].Ident()) + }) { + return lps + } + cp := make([]LockedProject, len(lps)) + copy(cp, lps) + sort.Slice(cp, func(i, j int) bool { + return cp[i].Ident().Less(cp[j].Ident()) + }) + return cp +} + // LockedProject is a single project entry from a lock file. It expresses the // project's name, one or both of version and underlying revision, the network // URI for accessing it, the path at which it should be placed within a vendor @@ -230,23 +233,3 @@ func prepLock(l Lock) safeLock { return rl } - -// SortLockedProjects sorts a slice of LockedProject in alphabetical order by -// ProjectIdentifier. -func SortLockedProjects(lps []LockedProject) { - sort.Stable(lpsorter(lps)) -} - -type lpsorter []LockedProject - -func (lps lpsorter) Swap(i, j int) { - lps[i], lps[j] = lps[j], lps[i] -} - -func (lps lpsorter) Len() int { - return len(lps) -} - -func (lps lpsorter) Less(i, j int) bool { - return lps[i].Ident().less(lps[j].Ident()) -} diff --git a/internal/gps/lock_test.go b/internal/gps/lock_test.go index a985b40b01..3f9ca6ff2c 100644 --- a/internal/gps/lock_test.go +++ b/internal/gps/lock_test.go @@ -6,6 +6,7 @@ package gps import ( "reflect" + "sort" "testing" ) @@ -20,7 +21,9 @@ func TestLockedProjectSorting(t *testing.T) { lps2 := make([]LockedProject, len(lps)) copy(lps2, lps) - SortLockedProjects(lps2) + sort.SliceStable(lps2, func(i, j int) bool { + return lps2[i].Ident().Less(lps2[j].Ident()) + }) // only the two should have switched positions lps[0], lps[2] = lps[2], lps[0] diff --git a/internal/gps/lockdiff.go b/internal/gps/lockdiff.go index 4325ed8217..b695486dea 100644 --- a/internal/gps/lockdiff.go +++ b/internal/gps/lockdiff.go @@ -74,20 +74,8 @@ func DiffLocks(l1 Lock, l2 Lock) *LockDiff { p1, p2 := l1.Projects(), l2.Projects() - // Check if the slices are sorted already. If they are, we can compare - // without copying. Otherwise, we have to copy to avoid altering the - // original input. - sp1, sp2 := lpsorter(p1), lpsorter(p2) - if len(p1) > 1 && !sort.IsSorted(sp1) { - p1 = make([]LockedProject, len(p1)) - copy(p1, l1.Projects()) - sort.Sort(lpsorter(p1)) - } - if len(p2) > 1 && !sort.IsSorted(sp2) { - p2 = make([]LockedProject, len(p2)) - copy(p2, l2.Projects()) - sort.Sort(lpsorter(p2)) - } + p1 = sortedLockedProjects(p1) + p2 = sortedLockedProjects(p2) diff := LockDiff{} diff --git a/internal/gps/solver.go b/internal/gps/solver.go index 0515f199dd..4de69922f4 100644 --- a/internal/gps/solver.go +++ b/internal/gps/solver.go @@ -1123,7 +1123,7 @@ func (s *solver) unselectedComparator(i, j int) bool { case !ilock && jlock: return false case ilock && jlock: - return iname.less(jname) + return iname.Less(jname) } // Now, sort by number of available versions. This will trigger network @@ -1152,7 +1152,7 @@ func (s *solver) unselectedComparator(i, j int) bool { } // Finally, if all else fails, fall back to comparing by name - return iname.less(jname) + return iname.Less(jname) } func (s *solver) fail(id ProjectIdentifier) { diff --git a/lock.go b/lock.go index 14abd094b1..f9c9b88253 100644 --- a/lock.go +++ b/lock.go @@ -149,7 +149,9 @@ func (l *Lock) toRaw() rawLock { Projects: make([]rawLockedProject, len(l.P)), } - sort.Sort(SortedLockedProjects(l.P)) + sort.Slice(l.P, func(i, j int) bool { + return l.P[i].Ident().Less(l.P[j].Ident()) + }) for k, lp := range l.P { id := lp.Ident() @@ -197,21 +199,3 @@ func LockFromSolution(in gps.Solution) *Lock { copy(l.P, p) return l } - -// SortedLockedProjects implements sort.Interface. -type SortedLockedProjects []gps.LockedProject - -func (s SortedLockedProjects) Len() int { return len(s) } -func (s SortedLockedProjects) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s SortedLockedProjects) Less(i, j int) bool { - l, r := s[i].Ident(), s[j].Ident() - - if l.ProjectRoot < r.ProjectRoot { - return true - } - if r.ProjectRoot < l.ProjectRoot { - return false - } - - return l.Source < r.Source -} From 704bf90d265faf8146f7266ac571c79374bd3c67 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Fri, 18 Aug 2017 14:42:32 -0500 Subject: [PATCH 04/16] drop support for go1.7 --- .travis.yml | 2 +- README.md | 2 +- internal/fs/fs.go | 2 +- internal/fs/rename.go | 5 --- internal/fs/rename_go17.go | 50 ---------------------------- internal/fs/rename_windows.go | 4 --- internal/gps/manager_test.go | 10 +++--- internal/gps/remove_go16.go | 48 -------------------------- internal/gps/remove_go17.go | 15 --------- internal/gps/result.go | 2 +- internal/gps/source_test.go | 3 +- internal/gps/strip_vendor.go | 2 +- internal/gps/strip_vendor_windows.go | 2 +- internal/gps/vcs_source_test.go | 8 ++--- 14 files changed, 17 insertions(+), 138 deletions(-) delete mode 100644 internal/fs/rename_go17.go delete mode 100644 internal/gps/remove_go16.go delete mode 100644 internal/gps/remove_go17.go diff --git a/.travis.yml b/.travis.yml index 079b64265e..babe85f82a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ jobs: - codeclimate-test-reporter < coverage.txt # YAML alias, for settings shared across the simpler builds - &simple-test - go: 1.7.x + go: 1.9.x stage: test install: skip env: diff --git a/README.md b/README.md index 91b829f1dd..db41be5feb 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Dep -`dep` is a prototype dependency management tool for Go. It requires Go 1.7 or newer to compile. +`dep` is a prototype dependency management tool for Go. It requires Go 1.8 or newer to compile. `dep` is the official _experiment_, but not yet the official tool. Check out the [Roadmap](https://github.com/golang/dep/wiki/Roadmap) for more on what this means! diff --git a/internal/fs/fs.go b/internal/fs/fs.go index 84f0346856..0e7127fce6 100644 --- a/internal/fs/fs.go +++ b/internal/fs/fs.go @@ -109,7 +109,7 @@ func RenameWithFallback(src, dst string) error { return errors.Wrapf(err, "cannot stat %s", src) } - err = rename(src, dst) + err = os.Rename(src, dst) if err == nil { return nil } diff --git a/internal/fs/rename.go b/internal/fs/rename.go index 3718d4575b..c48f69f1a0 100644 --- a/internal/fs/rename.go +++ b/internal/fs/rename.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. // +build !windows -// +build go1.8 package fs @@ -14,10 +13,6 @@ import ( "github.com/pkg/errors" ) -func rename(src, dst string) error { - return os.Rename(src, dst) -} - // renameFallback attempts to determine the appropriate fallback to failed rename // operation depending on the resulting error. func renameFallback(err error, src, dst string) error { diff --git a/internal/fs/rename_go17.go b/internal/fs/rename_go17.go deleted file mode 100644 index 33807b26ce..0000000000 --- a/internal/fs/rename_go17.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !windows -// +build !go1.8 - -package fs - -import ( - "os" - "syscall" - - "github.com/pkg/errors" -) - -func rename(src, dst string) error { - fi, err := os.Stat(src) - if err != nil { - return errors.Wrapf(err, "cannot stat %s", src) - } - - // In go 1.8, the behavior of os.Rename changed on non-Windows platforms. It no - // longer allows renames that would replace an existing directory. This has - // always been the case on Windows, though. - // - // For consistency, we replicate the go 1.8 behavior in earlier go versions here. - if dstfi, err := os.Stat(dst); fi.IsDir() && err == nil && dstfi.IsDir() { - return errors.Errorf("cannot rename directory %s to existing dst %s", src, dst) - } - - return os.Rename(src, dst) -} - -// renameFallback attempts to determine the appropriate fallback to failed rename -// operation depending on the resulting error. -func renameFallback(err error, src, dst string) error { - // Rename may fail if src and dst are on different devices; fall back to - // copy if we detect that case. syscall.EXDEV is the common name for the - // cross device link error which has varying output text across different - // operating systems. - terr, ok := err.(*os.LinkError) - if !ok { - return err - } else if terr.Err != syscall.EXDEV { - return errors.Wrapf(terr, "link error: cannot rename %s to %s", src, dst) - } - - return renameByCopy(src, dst) -} diff --git a/internal/fs/rename_windows.go b/internal/fs/rename_windows.go index 9f1264b03e..50829a5cd0 100644 --- a/internal/fs/rename_windows.go +++ b/internal/fs/rename_windows.go @@ -13,10 +13,6 @@ import ( "github.com/pkg/errors" ) -func rename(src, dst string) error { - return os.Rename(src, dst) -} - // renameFallback attempts to determine the appropriate fallback to failed rename // operation depending on the resulting error. func renameFallback(err error, src, dst string) error { diff --git a/internal/gps/manager_test.go b/internal/gps/manager_test.go index b5c15794a8..a897fc1ee1 100644 --- a/internal/gps/manager_test.go +++ b/internal/gps/manager_test.go @@ -47,7 +47,7 @@ func mkNaiveSM(t *testing.T) (*SourceMgr, func()) { return sm, func() { sm.Release() - err := removeAll(cpath) + err := os.RemoveAll(cpath) if err != nil { t.Errorf("removeAll failed: %s", err) } @@ -65,7 +65,7 @@ func remakeNaiveSM(osm *SourceMgr, t *testing.T) (*SourceMgr, func()) { return sm, func() { sm.Release() - err := removeAll(cpath) + err := os.RemoveAll(cpath) if err != nil { t.Errorf("removeAll failed: %s", err) } @@ -95,7 +95,7 @@ func TestSourceManagerInit(t *testing.T) { } sm.Release() - err = removeAll(cpath) + err = os.RemoveAll(cpath) if err != nil { t.Errorf("removeAll failed: %s", err) } @@ -111,7 +111,7 @@ func TestSourceManagerInit(t *testing.T) { } sm.Release() - err = removeAll(cpath) + err = os.RemoveAll(cpath) if err != nil { t.Errorf("removeAll failed: %s", err) } @@ -135,7 +135,7 @@ func TestSourceInit(t *testing.T) { defer func() { sm.Release() - err := removeAll(cpath) + err := os.RemoveAll(cpath) if err != nil { t.Errorf("removeAll failed: %s", err) } diff --git a/internal/gps/remove_go16.go b/internal/gps/remove_go16.go deleted file mode 100644 index 879e792021..0000000000 --- a/internal/gps/remove_go16.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package gps - -import ( - "os" - "path/filepath" - "runtime" -) - -// removeAll removes path and any children it contains. It deals correctly with -// removal on Windows where, prior to Go 1.7, there were issues when files were -// set to read-only. -func removeAll(path string) error { - // Only need special handling for windows - if runtime.GOOS != "windows" { - return os.RemoveAll(path) - } - - // Simple case: if Remove works, we're done. - err := os.Remove(path) - if err == nil || os.IsNotExist(err) { - return nil - } - - // make sure all files are writable so we can delete them - err = filepath.Walk(path, func(path string, info os.FileInfo, err error) error { - if err != nil && err != filepath.SkipDir { - // walk gave us some error, give it back. - return err - } - mode := info.Mode() - if mode|0200 == mode { - return nil - } - - return os.Chmod(path, mode|0200) - }) - if err != nil { - return err - } - - return os.Remove(path) -} diff --git a/internal/gps/remove_go17.go b/internal/gps/remove_go17.go deleted file mode 100644 index 3400025046..0000000000 --- a/internal/gps/remove_go17.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7 - -package gps - -import "os" - -// go1.7 and later deal with the file perms issue in os.RemoveAll(), so our -// workaround is no longer necessary. -func removeAll(path string) error { - return os.RemoveAll(path) -} diff --git a/internal/gps/result.go b/internal/gps/result.go index 16e4f05268..65d3b591c0 100644 --- a/internal/gps/result.go +++ b/internal/gps/result.go @@ -98,7 +98,7 @@ func WriteDepTree(basedir string, l Lock, sm SourceManager, sv bool, logger *log logger.Println(" * ", err) } - removeAll(basedir) + os.RemoveAll(basedir) return errors.New("failed to write dep tree") } diff --git a/internal/gps/source_test.go b/internal/gps/source_test.go index b5679761a8..0b2d86651e 100644 --- a/internal/gps/source_test.go +++ b/internal/gps/source_test.go @@ -8,6 +8,7 @@ import ( "context" "fmt" "io/ioutil" + "os" "reflect" "testing" @@ -30,7 +31,7 @@ func testSourceGateway(t *testing.T) { bgc := context.Background() ctx, cancelFunc := context.WithCancel(bgc) defer func() { - removeAll(cachedir) + os.RemoveAll(cachedir) cancelFunc() }() diff --git a/internal/gps/strip_vendor.go b/internal/gps/strip_vendor.go index 324a07df80..184a0d2d2e 100644 --- a/internal/gps/strip_vendor.go +++ b/internal/gps/strip_vendor.go @@ -32,7 +32,7 @@ func stripVendor(path string, info os.FileInfo, err error) error { } if info.IsDir() { - if err := removeAll(path); err != nil { + if err := os.RemoveAll(path); err != nil { return err } return filepath.SkipDir diff --git a/internal/gps/strip_vendor_windows.go b/internal/gps/strip_vendor_windows.go index bb07da84c9..7d6acc4a3c 100644 --- a/internal/gps/strip_vendor_windows.go +++ b/internal/gps/strip_vendor_windows.go @@ -40,7 +40,7 @@ func stripVendor(path string, info os.FileInfo, err error) error { } case dir: - if err := removeAll(path); err != nil { + if err := os.RemoveAll(path); err != nil { return err } return filepath.SkipDir diff --git a/internal/gps/vcs_source_test.go b/internal/gps/vcs_source_test.go index a6b443a507..a13a1c6b6d 100644 --- a/internal/gps/vcs_source_test.go +++ b/internal/gps/vcs_source_test.go @@ -49,7 +49,7 @@ func testGitSourceInteractions(t *testing.T) { t.Errorf("Failed to create temp dir: %s", err) } defer func() { - if err := removeAll(cpath); err != nil { + if err := os.RemoveAll(cpath); err != nil { t.Errorf("removeAll failed: %s", err) } }() @@ -145,7 +145,7 @@ func testGopkginSourceInteractions(t *testing.T) { t.Errorf("Failed to create temp dir: %s", err) } defer func() { - if err := removeAll(cpath); err != nil { + if err := os.RemoveAll(cpath); err != nil { t.Errorf("removeAll failed: %s", err) } }() @@ -296,7 +296,7 @@ func testBzrSourceInteractions(t *testing.T) { t.Errorf("Failed to create temp dir: %s", err) } defer func() { - if err := removeAll(cpath); err != nil { + if err := os.RemoveAll(cpath); err != nil { t.Errorf("removeAll failed: %s", err) } }() @@ -406,7 +406,7 @@ func testHgSourceInteractions(t *testing.T) { t.Errorf("Failed to create temp dir: %s", err) } defer func() { - if err := removeAll(cpath); err != nil { + if err := os.RemoveAll(cpath); err != nil { t.Errorf("removeAll failed: %s", err) } }() From d04e58e61690730baece7d50e6f6401f83e3def4 Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Mon, 7 Aug 2017 10:58:53 +0300 Subject: [PATCH 05/16] Add version command --- cmd/dep/main.go | 1 + cmd/dep/version.go | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 cmd/dep/version.go diff --git a/cmd/dep/main.go b/cmd/dep/main.go index 5b8db13d3c..bb66c8e639 100644 --- a/cmd/dep/main.go +++ b/cmd/dep/main.go @@ -62,6 +62,7 @@ func (c *Config) Run() (exitCode int) { &ensureCommand{}, &hashinCommand{}, &pruneCommand{}, + &versionCommand{}, } examples := [][2]string{ diff --git a/cmd/dep/version.go b/cmd/dep/version.go new file mode 100644 index 0000000000..e6adf34327 --- /dev/null +++ b/cmd/dep/version.go @@ -0,0 +1,45 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "flag" + "runtime" + + "github.com/golang/dep" +) + +var ( + version = "devel" + date string + hash string +) + +const versionHelp = `Show the dep version information` + +func (cmd *versionCommand) Name() string { return "version" } +func (cmd *versionCommand) Args() string { + return "" +} +func (cmd *versionCommand) ShortHelp() string { return versionHelp } +func (cmd *versionCommand) LongHelp() string { return versionHelp } +func (cmd *versionCommand) Hidden() bool { return false } + +func (cmd *versionCommand) Register(fs *flag.FlagSet) {} + +type versionCommand struct{} + +func (cmd *versionCommand) Run(ctx *dep.Ctx, args []string) error { + ctx.Out.Printf(`dep: + version : %s + build date : %s + git hash : %s + go version : %s + go compiler : %s + platform : %s/%s +`, version, date, hash, + runtime.Version(), runtime.Compiler, runtime.GOOS, runtime.GOARCH) + return nil +} From 33610e5cd42f1305b764e7a0185c8fc94531717d Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Fri, 11 Aug 2017 22:45:42 +0300 Subject: [PATCH 06/16] Add deploy stage to CI Test test2 asd asdasd asd --- .travis.yml | 29 +++++++++++++++++++++++++++-- cmd/dep/version.go | 8 ++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 079b64265e..698ee1990a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ ---- language: go sudo: false notifications: @@ -6,6 +5,7 @@ notifications: jobs: include: - stage: test + go_import_path: github.com/golang/dep install: - go get -u honnef.co/go/tools/cmd/{gosimple,staticcheck} - npm install -g codeclimate-test-reporter @@ -24,11 +24,13 @@ jobs: - find . -path ./vendor -prune -o -type f -name "*.go" -printf '%P\n' | xargs ./licenseok - set -e; for pkg in $PKGS; do go test -race -coverprofile=profile.out -covermode=atomic $pkg; if [[ -f profile.out ]]; then cat profile.out >> coverage.txt; rm profile.out; fi; done after_success: - - codeclimate-test-reporter < coverage.txt + - echo "CHANGE BACK THIS" + # - codeclimate-test-reporter < coverage.txt # YAML alias, for settings shared across the simpler builds - &simple-test go: 1.7.x stage: test + go_import_path: github.com/golang/dep install: skip env: - DEPTESTBYPASS501=1 @@ -53,3 +55,26 @@ jobs: # Related: https://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f - trap EXIT - go test -race $(go list ./... | grep -v vendor) + - go: 1.8.x + stage: deploy + go_import_path: github.com/golang/dep + install: skip + script: skip + before_deploy: + - mkdir -p release + - cd cmd/dep + - CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w -X main.commitHash=$(git rev-parse --short HEAD 2>/dev/null) -X main.buildDate=$(date --iso-8601=seconds) -X main.version=$(git describe --tags --dirty)" -a -installsuffix cgo -o ../../release/dep-linux-amd64 + - CGO_ENABLED=0 GOOS=darwin go build -ldflags "-s -w -X main.commitHash=$(git rev-parse --short HEAD 2>/dev/null) -X main.buildDate=$(date --iso-8601=seconds) -X main.version=$(git describe --tags --dirty)" -a -installsuffix cgo -o ../../release/dep-darwin-amd64 + - cd ../.. + deploy: + - provider: releases + api_key: + secure: IP1BqLO5WAkI/LFT/4WkiTS7g0zgliUt3y5zqJJKfXatnv4tD/mZIaaJsApjTcVpcI9zbTtZZKFcWPJG3JMVVSUQHSLwupyTk/2dCzUfFadZzRnOtkHysNWJjstYUsNkpr/Qh8Dnvf2HQ7vMA4F2mGMPOA/JT0u4UKJLWmiNdmV0pcqHUqszGnomoXP497bXpvGzn7AMG+QtKe/s5OIihaPoGCfr2UF+tldVPbOuykrlVH8u/Rxv2N8RePjKBNoLWnnMLp6Gg5VvSBJX0Ns7bPx1nQdOiSAY0sNuETe2SDSIoGhuSk9hGppPrCTxcql5SaRnxFigN1zr/XOstFMh9mAzjYG2H2MiRKvRaZFVT8pzvvhSLNKUYsW9G/dts63BJuUdFgV+sp0yeO5al9aR4h7g6QGUlnUJ4rtUE8rB2JINfTFSP1U00i6ihTwDLt7xspAWQ5DaCky3SLeLCuKc9Gj3moMDozW4a2iN/ooujYin3Lbbh65o6bWz71P+sjczb+igXKwOkwxscAwdR7IY3yWJ7hvx0KsDADvLtEeXG4IahL0C7Z2ZzHfAHaLiPvDNZ/CBOzYSjOQDx0c92kFfruts57kwgzNaNUAlzZtv5CdxWZDZ/n2HxOb1Bd74RxW4oyXrxcWS6trHzoPwTJ0RSbO8gfneU7xqBHhp7LXoG4E= + file: + - release/dep-linux-amd64 + - release/dep-darwin-amd64 + skip_cleanup: true + on: + repo: ebati/dep + branch: ci-make-version + tags: true diff --git a/cmd/dep/version.go b/cmd/dep/version.go index e6adf34327..d7a3d33059 100644 --- a/cmd/dep/version.go +++ b/cmd/dep/version.go @@ -12,9 +12,9 @@ import ( ) var ( - version = "devel" - date string - hash string + version = "devel" + buildDate string + commitHash string ) const versionHelp = `Show the dep version information` @@ -39,7 +39,7 @@ func (cmd *versionCommand) Run(ctx *dep.Ctx, args []string) error { go version : %s go compiler : %s platform : %s/%s -`, version, date, hash, +`, version, buildDate, commitHash, runtime.Version(), runtime.Compiler, runtime.GOOS, runtime.GOARCH) return nil } From a189bb1d0c45e6bd23d214e75a1b137d730c7979 Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Sat, 12 Aug 2017 13:10:41 +0300 Subject: [PATCH 07/16] Add windows binary --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 698ee1990a..5fb293667d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,6 +65,7 @@ jobs: - cd cmd/dep - CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w -X main.commitHash=$(git rev-parse --short HEAD 2>/dev/null) -X main.buildDate=$(date --iso-8601=seconds) -X main.version=$(git describe --tags --dirty)" -a -installsuffix cgo -o ../../release/dep-linux-amd64 - CGO_ENABLED=0 GOOS=darwin go build -ldflags "-s -w -X main.commitHash=$(git rev-parse --short HEAD 2>/dev/null) -X main.buildDate=$(date --iso-8601=seconds) -X main.version=$(git describe --tags --dirty)" -a -installsuffix cgo -o ../../release/dep-darwin-amd64 + - CGO_ENABLED=0 GOOS=windows go build -ldflags "-s -w -X main.commitHash=$(git rev-parse --short HEAD 2>/dev/null) -X main.buildDate=$(date --iso-8601=seconds) -X main.version=$(git describe --tags --dirty)" -a -installsuffix cgo -o ../../release/dep-windows-amd64 - cd ../.. deploy: - provider: releases From 61c0b0532565d6aedef5c300412f41e43dce0b7d Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Sat, 12 Aug 2017 13:22:19 +0300 Subject: [PATCH 08/16] Update documentation --- .github/ISSUE_TEMPLATE.md | 7 +++++-- README.md | 6 +----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index fe7b278df1..fe51a5d3d9 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -5,7 +5,11 @@ everything here and write out the request, providing as much context as you can. --> -### What version of Go (`go version`) and `dep` (`git describe --tags`) are you using? +### What version of dep are you using (`dep version`)? + ### What `dep` command did you run? @@ -20,4 +24,3 @@ The output of `dep hash-inputs` may also be helpful to include. ### What did you expect to see? ### What did you see instead? - diff --git a/README.md b/README.md index 91b829f1dd..8fe00b3ee7 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,7 @@ That said, keep in mind the following: ## Setup -Get the tool via - -```sh -$ go get -u github.com/golang/dep/cmd/dep -``` +Grab the latest binary from the [releases](https://github.com/golang/dep/releases) page. On macOS you can install or upgrade to the latest released version with Homebrew: From 399752ee5dacb19c95fd111d0977121a8c881187 Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Sat, 12 Aug 2017 14:06:59 +0300 Subject: [PATCH 09/16] Add windows release --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5fb293667d..c7c5a20eba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,7 @@ jobs: file: - release/dep-linux-amd64 - release/dep-darwin-amd64 + - release/dep-windows-amd64 skip_cleanup: true on: repo: ebati/dep From 9a154325ee3f9075dcb98079a665a1c3850573b2 Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Sat, 19 Aug 2017 00:44:34 +0300 Subject: [PATCH 10/16] Move various CI commands to bash files --- .travis.yml | 19 ++++++------------- hack/build-all.bash | 37 +++++++++++++++++++++++++++++++++++++ hack/coverage.bash | 16 ++++++++++++++++ hack/validate-licence.bash | 12 ++++++++++++ hack/validate-linter.bash | 12 ++++++++++++ 5 files changed, 83 insertions(+), 13 deletions(-) create mode 100755 hack/build-all.bash create mode 100755 hack/coverage.bash create mode 100755 hack/validate-licence.bash create mode 100755 hack/validate-linter.bash diff --git a/.travis.yml b/.travis.yml index c7c5a20eba..bc062678eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,14 +15,9 @@ jobs: go: 1.8.x script: - go build -v ./cmd/dep - - PKGS=$(go list ./... | grep -v /vendor/) - - go vet $PKGS - - staticcheck $PKGS - - gosimple $PKGS + - ./hack/validate-linter.bash - ./hack/validate-vendor.bash - - go build ./hack/licenseok - - find . -path ./vendor -prune -o -type f -name "*.go" -printf '%P\n' | xargs ./licenseok - - set -e; for pkg in $PKGS; do go test -race -coverprofile=profile.out -covermode=atomic $pkg; if [[ -f profile.out ]]; then cat profile.out >> coverage.txt; rm profile.out; fi; done + - ./hack/coverage.bash after_success: - echo "CHANGE BACK THIS" # - codeclimate-test-reporter < coverage.txt @@ -61,20 +56,18 @@ jobs: install: skip script: skip before_deploy: - - mkdir -p release - - cd cmd/dep - - CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w -X main.commitHash=$(git rev-parse --short HEAD 2>/dev/null) -X main.buildDate=$(date --iso-8601=seconds) -X main.version=$(git describe --tags --dirty)" -a -installsuffix cgo -o ../../release/dep-linux-amd64 - - CGO_ENABLED=0 GOOS=darwin go build -ldflags "-s -w -X main.commitHash=$(git rev-parse --short HEAD 2>/dev/null) -X main.buildDate=$(date --iso-8601=seconds) -X main.version=$(git describe --tags --dirty)" -a -installsuffix cgo -o ../../release/dep-darwin-amd64 - - CGO_ENABLED=0 GOOS=windows go build -ldflags "-s -w -X main.commitHash=$(git rev-parse --short HEAD 2>/dev/null) -X main.buildDate=$(date --iso-8601=seconds) -X main.version=$(git describe --tags --dirty)" -a -installsuffix cgo -o ../../release/dep-windows-amd64 - - cd ../.. + - ./hack/build-all.bash deploy: - provider: releases api_key: secure: IP1BqLO5WAkI/LFT/4WkiTS7g0zgliUt3y5zqJJKfXatnv4tD/mZIaaJsApjTcVpcI9zbTtZZKFcWPJG3JMVVSUQHSLwupyTk/2dCzUfFadZzRnOtkHysNWJjstYUsNkpr/Qh8Dnvf2HQ7vMA4F2mGMPOA/JT0u4UKJLWmiNdmV0pcqHUqszGnomoXP497bXpvGzn7AMG+QtKe/s5OIihaPoGCfr2UF+tldVPbOuykrlVH8u/Rxv2N8RePjKBNoLWnnMLp6Gg5VvSBJX0Ns7bPx1nQdOiSAY0sNuETe2SDSIoGhuSk9hGppPrCTxcql5SaRnxFigN1zr/XOstFMh9mAzjYG2H2MiRKvRaZFVT8pzvvhSLNKUYsW9G/dts63BJuUdFgV+sp0yeO5al9aR4h7g6QGUlnUJ4rtUE8rB2JINfTFSP1U00i6ihTwDLt7xspAWQ5DaCky3SLeLCuKc9Gj3moMDozW4a2iN/ooujYin3Lbbh65o6bWz71P+sjczb+igXKwOkwxscAwdR7IY3yWJ7hvx0KsDADvLtEeXG4IahL0C7Z2ZzHfAHaLiPvDNZ/CBOzYSjOQDx0c92kFfruts57kwgzNaNUAlzZtv5CdxWZDZ/n2HxOb1Bd74RxW4oyXrxcWS6trHzoPwTJ0RSbO8gfneU7xqBHhp7LXoG4E= file: - release/dep-linux-amd64 + - release/dep-linux-amd64.sha256 - release/dep-darwin-amd64 + - release/dep-darwin-amd64.sha256 - release/dep-windows-amd64 + - release/dep-windows-amd64.sha256 skip_cleanup: true on: repo: ebati/dep diff --git a/hack/build-all.bash b/hack/build-all.bash new file mode 100755 index 0000000000..9797593a3e --- /dev/null +++ b/hack/build-all.bash @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# Copyright 2017 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# +# This script will build dep and calculate hash for each +# (DEP_BUILD_PLATFORMS, DEP_BUILD_ARCHS) pair. +# DEP_BUILD_PLATFORMS="linux" DEP_BUILD_ARCHS="amd64" ./hack/build-all.sh +# can be called to build only for linux-amd64 + +set -e + +VERSION=$(git describe --tags --dirty) +COMMIT_HASH=$(git rev-parse --short HEAD 2>/dev/null) +DATE=$(date --iso-8601) + +GO_BUILD_CMD="go build -a -installsuffix cgo" +GO_BUILD_LDFLAGS="-s -w -X main.commitHash=$COMMIT_HASH -X main.buildDate=$DATE -X main.version=$VERSION" + +if [ -z "$DEP_BUILD_PLATFORMS" ]; then + DEP_BUILD_PLATFORMS="linux windows darwin" +fi + +if [ -z "$DEP_BUILD_ARCHS" ]; then + DEP_BUILD_ARCHS="amd64" +fi + +mkdir -p release + +for OS in ${DEP_BUILD_PLATFORMS[@]}; do + for ARCH in ${DEP_BUILD_ARCHS[@]}; do + echo "Building for $OS/$ARCH" + GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 $GO_BUILD_CMD -ldflags "$GO_BUILD_LDFLAGS"\ + -o "release/dep-$OS-$ARCH" ./cmd/dep/ + sha256sum "release/dep-$OS-$ARCH" > "release/dep-$OS-$ARCH".sha256 + done +done diff --git a/hack/coverage.bash b/hack/coverage.bash new file mode 100755 index 0000000000..6ad89d9f54 --- /dev/null +++ b/hack/coverage.bash @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Copyright 2017 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# +# This script will generate coverage.txt +set -e + +PKGS=$(go list ./... | grep -v /vendor/) +for pkg in $PKGS; do + go test -race -coverprofile=profile.out -covermode=atomic $pkg + if [[ -f profile.out ]]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done diff --git a/hack/validate-licence.bash b/hack/validate-licence.bash new file mode 100755 index 0000000000..c9ff89ec40 --- /dev/null +++ b/hack/validate-licence.bash @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Copyright 2017 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# +# This script will build licenseok and run it on all +# source files to check licence +set -e + +go build ./hack/licenseok +find . -path ./vendor -prune -o -type f -name "*.go"\ + -printf '%P\n' | xargs ./licenseok diff --git a/hack/validate-linter.bash b/hack/validate-linter.bash new file mode 100755 index 0000000000..1e446eb3a8 --- /dev/null +++ b/hack/validate-linter.bash @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Copyright 2017 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. +# +# This script will validate code with various linters +set -e + +PKGS=$(go list ./... | grep -v /vendor/) +go vet $PKGS +staticcheck $PKGS +gosimple $PKGS From 52f2cc92aa76e8ab0225ea0086a09a396bd5ac49 Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Sat, 19 Aug 2017 00:48:49 +0300 Subject: [PATCH 11/16] Update readme with de-emphasized go get --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 8fe00b3ee7..24c32a22f3 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,12 @@ $ brew install dep $ brew upgrade dep ``` +You can also install dep via + +```sh +go get -u github.com/dep/cmd/dep +``` + To start managing dependencies using dep, run the following from your project's root directory: ```sh From 2484c39c124833d133021aa0a92a2d106aa93c57 Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Sat, 19 Aug 2017 15:44:23 +0300 Subject: [PATCH 12/16] Add brew formula with dryrun option --- .travis.yml | 15 ++++++++++++++- hack/{validate-linter.bash => lint.bash} | 0 2 files changed, 14 insertions(+), 1 deletion(-) rename hack/{validate-linter.bash => lint.bash} (100%) diff --git a/.travis.yml b/.travis.yml index bc062678eb..eb1f99f5dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ jobs: go: 1.8.x script: - go build -v ./cmd/dep - - ./hack/validate-linter.bash + - ./hack/lint.bash - ./hack/validate-vendor.bash - ./hack/coverage.bash after_success: @@ -73,3 +73,16 @@ jobs: repo: ebati/dep branch: ci-make-version tags: true + - go: 1.8.x + os: osx + stage: brew-deploy + install: skip + script: skip + deploy: + - provider: script + script: + - brew bump-formula-pr --dry-run --message= --url=https://github.com/ebati/dep/releases/download/$TRAVIS_TAG/dep-darwin-amd64 --sha256=https://github.com/ebati/dep/releases/download/$TRAVIS_TAG/dep-darwin-amd64.sha256 dep + on: + repo: ebati/dep + branch: ci-make-version + tags: true diff --git a/hack/validate-linter.bash b/hack/lint.bash similarity index 100% rename from hack/validate-linter.bash rename to hack/lint.bash From f4428b670275d16db616953d604e8691d16b3858 Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Sat, 19 Aug 2017 18:15:20 +0300 Subject: [PATCH 13/16] Add brew update --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eb1f99f5dd..8d2ca613b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,7 +81,7 @@ jobs: deploy: - provider: script script: - - brew bump-formula-pr --dry-run --message= --url=https://github.com/ebati/dep/releases/download/$TRAVIS_TAG/dep-darwin-amd64 --sha256=https://github.com/ebati/dep/releases/download/$TRAVIS_TAG/dep-darwin-amd64.sha256 dep + - brew update && brew bump-formula-pr --dry-run --message= --url=https://github.com/ebati/dep/releases/download/$TRAVIS_TAG/dep-darwin-amd64 --sha256=https://github.com/ebati/dep/releases/download/$TRAVIS_TAG/dep-darwin-amd64.sha256 dep on: repo: ebati/dep branch: ci-make-version From ad93f483b1204b330b198c0fde1ca1cc2eb8022f Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Sun, 20 Aug 2017 11:48:34 +0300 Subject: [PATCH 14/16] Replace variables for golang/dep --- .travis.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d2ca613b9..20e34a0bf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,7 @@ jobs: - ./hack/validate-vendor.bash - ./hack/coverage.bash after_success: - - echo "CHANGE BACK THIS" - # - codeclimate-test-reporter < coverage.txt + - codeclimate-test-reporter < coverage.txt # YAML alias, for settings shared across the simpler builds - &simple-test go: 1.7.x @@ -60,7 +59,7 @@ jobs: deploy: - provider: releases api_key: - secure: IP1BqLO5WAkI/LFT/4WkiTS7g0zgliUt3y5zqJJKfXatnv4tD/mZIaaJsApjTcVpcI9zbTtZZKFcWPJG3JMVVSUQHSLwupyTk/2dCzUfFadZzRnOtkHysNWJjstYUsNkpr/Qh8Dnvf2HQ7vMA4F2mGMPOA/JT0u4UKJLWmiNdmV0pcqHUqszGnomoXP497bXpvGzn7AMG+QtKe/s5OIihaPoGCfr2UF+tldVPbOuykrlVH8u/Rxv2N8RePjKBNoLWnnMLp6Gg5VvSBJX0Ns7bPx1nQdOiSAY0sNuETe2SDSIoGhuSk9hGppPrCTxcql5SaRnxFigN1zr/XOstFMh9mAzjYG2H2MiRKvRaZFVT8pzvvhSLNKUYsW9G/dts63BJuUdFgV+sp0yeO5al9aR4h7g6QGUlnUJ4rtUE8rB2JINfTFSP1U00i6ihTwDLt7xspAWQ5DaCky3SLeLCuKc9Gj3moMDozW4a2iN/ooujYin3Lbbh65o6bWz71P+sjczb+igXKwOkwxscAwdR7IY3yWJ7hvx0KsDADvLtEeXG4IahL0C7Z2ZzHfAHaLiPvDNZ/CBOzYSjOQDx0c92kFfruts57kwgzNaNUAlzZtv5CdxWZDZ/n2HxOb1Bd74RxW4oyXrxcWS6trHzoPwTJ0RSbO8gfneU7xqBHhp7LXoG4E= + secure: fL9GX11J3JLizEBTPZHN32wuAT91eAJsGl0kjlAdIc6Lb/9UCe1XZGgFnpQFN4qo/S+omhHBDbM6Ty1xhNy7xmjDecpQGDU8Rmap9Oll0TuxqMigG+njOuPp5VUYPofPP0PGKdxAcYg+KaFM7x0o2rK+qA046NHwo2gH1BbE+bn55TZglEajEfc8j9iX4jt96KC7zlu+WiKArLmfUtlrI8m8ZYgbYcvFmlYjeCiEqlNhvNL59ejug9Rl0PLtPbamqVXkGLafYtekgPCb4WSxBiCt8pq5Rb5svk9YcdXpiaWQhZjMPAuKN6BrmN2lw1PiXzADUG5fjvNc8eo2HY70GD2utU9cAsY8VIafhoH5n6uM1WI8MHwDfd7P1PiQA3ZGQ8CPwk4q/8HSfQU9ap7vZgSF63pTIbtlviyIG67orOJE9PWWncl9olYM946UylZu6m3hWI/rmJxOeJ1UJjym/3GNPMRfKubaGhV/TyRdM0bKX4M0cXHU6k/ESVFupGXdKRt4RpvkD4/1Km6b2OShW6PNI+ifFspnJr7obkI7dm7ubySdnNz4lMv9WWymxRpMVc8hUAhuoDvXeZJq7pSnkjBEWDxIRoTkA93CU3/Rf7MFYCJMnGSqjcxWUpIfCAk2/r4BqL9NQnqBvvVt+MYi64QaD5n7ZF3dVbr6HZ2zjSU= file: - release/dep-linux-amd64 - release/dep-linux-amd64.sha256 @@ -70,19 +69,6 @@ jobs: - release/dep-windows-amd64.sha256 skip_cleanup: true on: - repo: ebati/dep - branch: ci-make-version - tags: true - - go: 1.8.x - os: osx - stage: brew-deploy - install: skip - script: skip - deploy: - - provider: script - script: - - brew update && brew bump-formula-pr --dry-run --message= --url=https://github.com/ebati/dep/releases/download/$TRAVIS_TAG/dep-darwin-amd64 --sha256=https://github.com/ebati/dep/releases/download/$TRAVIS_TAG/dep-darwin-amd64.sha256 dep - on: - repo: ebati/dep - branch: ci-make-version + repo: golang/dep + branch: master tags: true From 9217125e0c1be14f33ab12dc4d10b9ba187fbe27 Mon Sep 17 00:00:00 2001 From: Emrecan BATI Date: Tue, 29 Aug 2017 07:39:18 +0300 Subject: [PATCH 15/16] Fix wording --- .github/ISSUE_TEMPLATE.md | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index fe51a5d3d9..3e612d9b2a 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -5,10 +5,10 @@ everything here and write out the request, providing as much context as you can. --> -### What version of dep are you using (`dep version`)? +### What version of `dep` are you using (`dep version`)? ### What `dep` command did you run? diff --git a/README.md b/README.md index 24c32a22f3..17d441bc08 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ $ brew install dep $ brew upgrade dep ``` -You can also install dep via +If you're interested in hacking on `dep`, you can install via `go get`: ```sh go get -u github.com/dep/cmd/dep From 94f196ae273402600bf538ad7ac44b102e99c8fb Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Date: Mon, 28 Aug 2017 23:22:31 -0600 Subject: [PATCH 16/16] Add 'golang' to go get URL of Setup instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e00c78deab..c6dae6e3cd 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ $ brew upgrade dep If you're interested in hacking on `dep`, you can install via `go get`: ```sh -go get -u github.com/dep/cmd/dep +go get -u github.com/golang/dep/cmd/dep ``` To start managing dependencies using dep, run the following from your project's root directory: