Skip to content

Commit d5803da

Browse files
vassudanaguntabep
authored andcommitted
Support offline builds
1 parent 27c77e1 commit d5803da

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

‎appveyor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ install:
1212
- go get github.com/magefile/mage
1313

1414
build_script:
15-
- mage hugoRace
15+
- mage vendor hugoRace
1616
- mage -v check
1717
- hugo -s docs/
1818
- hugo --renderToMemory -s docs/

‎magefile.go‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,16 @@ func Vendor() error {
4545

4646
// Build hugo binary
4747
func Hugo() error {
48-
mg.Deps(Vendor)
4948
return sh.RunWith(flagEnv(), goexe, "build", "-ldflags", ldflags, packageName)
5049
}
5150

5251
// Build hugo binary with race detector enabled
5352
func HugoRace() error {
54-
mg.Deps(Vendor)
5553
return sh.RunWith(flagEnv(), goexe, "build", "-race", "-ldflags", ldflags, packageName)
5654
}
5755

5856
// Install hugo binary
5957
func Install() error {
60-
mg.Deps(Vendor)
6158
return sh.RunWith(flagEnv(), goexe, "install", "-ldflags", ldflags, packageName)
6259
}
6360

@@ -115,13 +112,11 @@ func Test386() error {
115112

116113
// Run tests
117114
func Test() error {
118-
mg.Deps(getDep)
119115
return sh.Run(goexe, "test", "./...")
120116
}
121117

122118
// Run tests with race detector
123119
func TestRace() error {
124-
mg.Deps(getDep)
125120
return sh.Run(goexe, "test", "-race", "./...")
126121
}
127122

‎snapcraft.yaml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ parts:
2929
export PATH=$GOPATH/bin:$PATH
3030
cd $GOPATH/src/github.com/gohugoio/hugo
3131
go get github.com/magefile/mage
32-
mage vendor
33-
mage test
32+
mage vendor test
3433
rm -f $GOPATH/bin/dep
3534
rm -f $GOPATH/bin/mage
3635
install: |

0 commit comments

Comments
 (0)