2017-05-08 17:19:02 +08:00
|
|
|
language: go
|
|
|
|
|
|
|
|
go:
|
2019-03-04 15:08:59 +08:00
|
|
|
- "1.12"
|
2017-05-08 17:38:35 +08:00
|
|
|
|
|
|
|
sudo: true
|
2019-03-04 15:45:57 +08:00
|
|
|
install: true
|
2017-05-08 17:38:35 +08:00
|
|
|
|
|
|
|
before_install:
|
2018-03-06 15:24:26 +08:00
|
|
|
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
2017-05-08 17:38:35 +08:00
|
|
|
|
|
|
|
script:
|
2019-03-04 15:50:59 +08:00
|
|
|
- dep ensure && GO_ENABLED=1 go build -v -x -tags "pam" && go install
|
2017-05-08 17:19:02 +08:00
|
|
|
|
2017-05-08 17:25:31 +08:00
|
|
|
before_deploy:
|
2018-03-06 15:08:27 +08:00
|
|
|
- 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`'"
|
2018-07-18 17:56:33 +08:00
|
|
|
- rm -rf simsun.ttc start.sh 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
|
2017-05-09 10:33:02 +08:00
|
|
|
- cp conf/app.conf.example conf/app.conf
|
2018-07-11 16:47:26 +08:00
|
|
|
- zip -r mindoc_linux_amd64.zip conf static uploads views lib mindoc_linux_amd64
|
2017-07-10 18:05:21 +08:00
|
|
|
|
2017-05-08 17:19:02 +08:00
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: $CI_USER_TOKEN
|
|
|
|
skip_cleanup: true
|
|
|
|
file:
|
2017-06-14 09:29:08 +08:00
|
|
|
- mindoc_linux_amd64.zip
|
2017-05-08 17:19:02 +08:00
|
|
|
on:
|
|
|
|
overwrite: true
|
|
|
|
tags: true
|
|
|
|
all_branches: true
|
2019-03-04 15:08:59 +08:00
|
|
|
go: "1.12"
|