forked from mindoc-org/mindoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (32 loc) · 1.36 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
language: go
go:
- "1.10"
sudo: true
install: false
before_install:
- go get github.com/bradfitz/gomemcache/memcache
- go get github.com/garyburd/redigo/internal
- go get github.com/garyburd/redigo/redis
- go get github.com/go-sql-driver/mysql
- go get github.com/golang/freetype
- go get -u gopkg.in/russross/blackfriday.v2
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
script:
- dep ensure -v && GO_ENABLED=1 go build -v -x -tags "pam" && go install
before_deploy:
- sudo apt-get -qq update
- dep ensure -v && CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build -o mindoc_linux_amd64 -ldflags="-w -X github.com/lifei6671/mindoc/conf.VERSION=$TRAVIS_TAG -X 'github.com/lifei6671/mindoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`github.com/lifei6671/mindoc/go version`'"
- rm -rf commands controllers models modules data routers tasks vendor docs search utils graphics .git Godeps uploads/* .gitignore .travis.yml Dockerfile Gopkg.toml LICENSE main.go README.md conf/enumerate.go conf/mail.go install.lock *.md
- cp conf/app.conf.example conf/app.conf
- zip -r mindoc_linux_amd64.zip conf logs static uploads views lib mindoc_linux_amd64
deploy:
provider: releases
api_key: $CI_USER_TOKEN
skip_cleanup: true
file:
- mindoc_linux_amd64.zip
on:
overwrite: true
tags: true
all_branches: true
go: "1.10"