before_script

This commit is contained in:
Henrique Dias 2017-04-23 15:39:12 +01:00
parent 3e78d45366
commit 135a12ee30
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
2 changed files with 14 additions and 9 deletions

View File

@ -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

13
before_script.sh Normal file
View File

@ -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