diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-08-30 11:10:25 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-08-30 13:36:33 +0200 |
commit | fdf3c3b8234ed340f40a85fb76d96ae3a9ccf195 (patch) | |
tree | 77cc1e3af65154552e9ceaca6b7a618887e8cb53 /magefile.go | |
parent | 312d2252be6b7bf250fa4f8b1b541fdc13641940 (diff) | |
download | hugo-fdf3c3b8234ed340f40a85fb76d96ae3a9ccf195.tar.gz hugo-fdf3c3b8234ed340f40a85fb76d96ae3a9ccf195.zip |
build: Remove the remains of Go Dep
Appveyor is now Go 1.11 ready, so we can go all "Go Modules".
Closes #5115
Diffstat (limited to 'magefile.go')
-rw-r--r-- | magefile.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/magefile.go b/magefile.go index ecc4b0b58..91c79b1dd 100644 --- a/magefile.go +++ b/magefile.go @@ -38,24 +38,6 @@ func init() { os.Setenv("GO111MODULE", "on") } -func getDep() error { - if !isWindows() { - // We only need this on Appveyor. - // TODO(bep) go11 clean up the vendor stuff once Appveyor gets Go 1.11. - return nil - } - return sh.Run(goexe, "get", "-u", "github.com/golang/dep/cmd/dep") -} - -// Install Go Dep and sync Hugo's vendored dependencies -func Vendor() error { - if !isWindows() { - return nil - } - mg.Deps(getDep) - return sh.Run("dep", "ensure") -} - // Build hugo binary func Hugo() error { return sh.RunWith(flagEnv(), goexe, "build", "-ldflags", ldflags, "-tags", buildTags(), packageName) @@ -182,7 +164,6 @@ func Fmt() error { var pkgPrefixLen = len("github.com/gohugoio/hugo") func hugoPackages() ([]string, error) { - mg.Deps(getDep) s, err := sh.Output(goexe, "list", "./...") if err != nil { return nil, err @@ -217,7 +198,6 @@ func Lint() error { // Run go vet linter func Vet() error { - mg.Deps(getDep) if err := sh.Run(goexe, "vet", "./..."); err != nil { return fmt.Errorf("error running govendor: %v", err) } @@ -226,7 +206,6 @@ func Vet() error { // Generate test coverage report func TestCoverHTML() error { - mg.Deps(getDep) const ( coverAll = "coverage-all.out" cover = "coverage.out" @@ -266,24 +245,10 @@ func TestCoverHTML() error { return sh.Run(goexe, "tool", "cover", "-html="+coverAll) } -// Verify that vendored packages match git HEAD -func CheckVendor() error { - if err := sh.Run("git", "diff-index", "--quiet", "HEAD", "vendor/"); err != nil { - // yes, ignore errors from this, not much we can do. - sh.Exec(nil, os.Stdout, os.Stderr, "git", "diff", "vendor/") - return errors.New("check-vendor target failed: vendored packages out of sync") - } - return nil -} - func isGoLatest() bool { return strings.Contains(runtime.Version(), "1.11") } -func isWindows() bool { - return runtime.GOOS == "windows" -} - func buildTags() string { // To build the extended Hugo SCSS/SASS enabled version, build with // HUGO_BUILD_TAGS=extended mage install etc. |