Created
January 25, 2019 19:49
-
-
Save machsix/bad55bdcb1b2b676e8eb56e029265cc4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notifications: | |
email: false | |
services: | |
- postgresql | |
- docker | |
addons: | |
postgresql: "9.4" | |
language: go | |
go_import_path: "miniflux.app" | |
go: | |
- "1.11" | |
before_install: | |
- npm install -g jshint | |
- go get -u golang.org/x/lint/golint | |
script: | |
- jshint ui/static/js/*.js | |
- make lint | |
- make linux-amd64 | |
- export TRAVIS_TAG=`git describe --abbrev=0 --tags` | |
- "echo \"Main version: ${TRAVIS_TAG}\"" | |
before_deploy: | |
- git config --global user.email "[email protected]" | |
- git config --global user.name "Travis CI" | |
- git tag -d ${TRAVIS_TAG} | |
- echo 'Delete tag' | |
- git push https://${GH_USER}:${GH_TOKEN}@github.com/${GH_REF} :refs/tags/${TRAVIS_TAG} | |
- "export ID=`curl -H \"Authorization: token ${GH_TOKEN}\" -X GET https://api.github.com/repos/${GH_REF}/releases|jq \".[0].id\"`" | |
- echo 'Delete draft release' | |
- "if [[ $ID != 'null' ]]; then curl -H \"Authorization: token ${GH_TOKEN}\" -X DELETE https://api.github.com/repos/${GH_REF}/releases/$id; fi" | |
- cp miniflux.1 LICENSE ChangeLog miniflux-linux-amd64 rpmbuild/SOURCES/ | |
- "export SUBVER=`git rev-list \"${TRAVIS_TAG}\"..\"${TRAVIS_COMMIT}\" --count`" | |
- export SUBVER=$(($SUBVE + 1)) | |
- "git tag -a ${TRAVIS_TAG} -m \"subversion: ${SUBVER}\"" | |
- git push https://${GH_USER}:${GH_TOKEN}@github.com/${GH_REF} refs/tags/${TRAVIS_TAG}:refs/tags/${TRAVIS_TAG} | |
- "echo \"Minor version: ${SUBVER}\"" | |
- "sed -i \"s|^Version:.*$|Version: ${TRAVIS_TAG}|\" rpmbuild/SPECS/miniflux.spec" | |
- "sed -i \"s|^Release:.*$|Release: ${SUBVER}%{?dist}|\" rpmbuild/SPECS/miniflux.spec" | |
- docker build -t miniflux/rpmbuild -f rpmbuild/Dockerfile . | |
- docker run --rm -v $(pwd)/rpmbuild:/root/rpmbuild miniflux/rpmbuild rpmbuild -bb /root/rpmbuild/SPECS/miniflux.spec | |
- find ./rpmbuild -name '*.rpm' -exec cp {} ./ \; | |
deploy: | |
overwrite: true | |
provider: releases | |
api_key: "$GH_TOKEN" | |
file_glob: true | |
file: | |
- "miniflux-linux-amd64" | |
- "*.rpm" | |
skip_cleanup: true | |
on: | |
branch: master'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment