From: Vas Sudanagunta Date: Wed, 3 Jan 2018 01:19:16 +0000 (-0500) Subject: Support offline builds X-Git-Tag: v0.33~24 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d5803da1befba5446d1b2c1ad16f6467dc7b3991;p=brevno-suite%2Fhugo Support offline builds --- diff --git a/appveyor.yml b/appveyor.yml index af1bb3ad..0ed9e959 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ install: - go get github.com/magefile/mage build_script: - - mage hugoRace + - mage vendor hugoRace - mage -v check - hugo -s docs/ - hugo --renderToMemory -s docs/ diff --git a/magefile.go b/magefile.go index d74aaa3e..964bfeb6 100644 --- a/magefile.go +++ b/magefile.go @@ -45,19 +45,16 @@ func Vendor() error { // Build hugo binary func Hugo() error { - mg.Deps(Vendor) return sh.RunWith(flagEnv(), goexe, "build", "-ldflags", ldflags, packageName) } // Build hugo binary with race detector enabled func HugoRace() error { - mg.Deps(Vendor) return sh.RunWith(flagEnv(), goexe, "build", "-race", "-ldflags", ldflags, packageName) } // Install hugo binary func Install() error { - mg.Deps(Vendor) return sh.RunWith(flagEnv(), goexe, "install", "-ldflags", ldflags, packageName) } @@ -115,13 +112,11 @@ func Test386() error { // Run tests func Test() error { - mg.Deps(getDep) return sh.Run(goexe, "test", "./...") } // Run tests with race detector func TestRace() error { - mg.Deps(getDep) return sh.Run(goexe, "test", "-race", "./...") } diff --git a/snapcraft.yaml b/snapcraft.yaml index fe584e74..bc49034a 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -29,8 +29,7 @@ parts: export PATH=$GOPATH/bin:$PATH cd $GOPATH/src/github.com/gohugoio/hugo go get github.com/magefile/mage - mage vendor - mage test + mage vendor test rm -f $GOPATH/bin/dep rm -f $GOPATH/bin/mage install: |