.travis.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. language: go
  2. go:
  3. - "1.10.3"
  4. sudo: true
  5. install: false
  6. before_install:
  7. - go get github.com/bradfitz/gomemcache/memcache
  8. - go get github.com/garyburd/redigo/internal
  9. - go get github.com/garyburd/redigo/redis
  10. - go get github.com/go-sql-driver/mysql
  11. - go get github.com/golang/freetype
  12. - go get -u gopkg.in/russross/blackfriday.v2
  13. - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  14. script:
  15. - dep ensure -v && GO_ENABLED=1 go build -v -x -tags "pam" && go install
  16. before_deploy:
  17. - sudo apt-get -qq update
  18. - 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`'"
  19. - 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
  20. - cp conf/app.conf.example conf/app.conf
  21. - zip -r mindoc_linux_amd64.zip conf static uploads views lib mindoc_linux_amd64
  22. deploy:
  23. provider: releases
  24. api_key: $CI_USER_TOKEN
  25. skip_cleanup: true
  26. file:
  27. - mindoc_linux_amd64.zip
  28. on:
  29. overwrite: true
  30. tags: true
  31. all_branches: true
  32. go: "1.10.3"