diff --git a/.travis.yml b/.travis.yml index 8119a414..88708efd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,14 +9,6 @@ install: - go get github.com/mholt/caddy/caddyhttp before_script: - - mkdir $GOPATH/src/caddy - - touch $GOPATH/src/caddy/main.go - - echo 'package main - import "github.com/mholt/caddy/caddy/caddymain" - import "github.com/hacdias/caddy-hugo" - func main() { - caddymain.Run() - }' >> $GOPATH/src/caddy/main.go - + - ./before_script.sh script: - go build caddy diff --git a/before_script.sh b/before_script.sh new file mode 100644 index 00000000..5058bba8 --- /dev/null +++ b/before_script.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e +mkdir $GOPATH/src/caddy +touch $GOPATH/src/caddy/main.go + +cat << 'EOF' >> $GOPATH/src/caddy/main.go +package main\n +import "github.com/mholt/caddy/caddy/caddymain" +import "github.com/hacdias/caddy-hugo" +func main() { + caddymain.Run() +} +EOF \ No newline at end of file