From f2db18dc53211a4e46727d3558f5563b8d5077e2 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sat, 12 Mar 2016 16:13:04 +0900 Subject: [PATCH] Add bintray deploy in travis build. --- .bintray.in | 43 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 23 +++++++++++---------- tools/travis_postbuild.sh | 12 +++++++++++ 3 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 .bintray.in create mode 100755 tools/travis_postbuild.sh diff --git a/.bintray.in b/.bintray.in new file mode 100644 index 0000000..e38c1db --- /dev/null +++ b/.bintray.in @@ -0,0 +1,43 @@ +{ + /* Bintray package information. + In case the package already exists on Bintray, only the name, repo and subject + fields are mandatory. */ + + "package": { + "name": "releases", // Bintray package name + "repo": "tinyobjloader", // Bintray repository name + "subject": "syoyo" // Bintray subject (user or organization) + }, + + /* Package version information. + In case the version already exists on Bintray, only the name fields is mandatory. */ + + "version": { + "name": "@VERSION@", + "desc": "@VERSION@", + "released": "@DATE@", + "vcs_tag": "@VERSION@", + "gpgSign": false + }, + + /* Configure the files you would like to upload to Bintray and their upload path. + You can define one or more groups of patterns. + Each group contains three patterns: + + includePattern: Pattern in the form of Ruby regular expression, indicating the path of files to be uploaded to Bintray. + excludePattern: Optional. Pattern in the form of Ruby regular expression, indicating the path of files to be removed from the list of files specified by the includePattern. + uploadPattern: Upload path on Bintray. The path can contain symbols in the form of $1, $2,... that are replaced with capturing groups defined in the include pattern. + + In the example below, the following files are uploaded, + 1. All gem files located under build/bin/ (including sub directories), + except for files under a the do-not-deploy directory. + The files will be uploaded to Bintray under the gems folder. + 2. All files under build/docs. The files will be uploaded to Bintray under the docs folder. + + Note: Regular expressions defined as part of the includePattern property must be wrapped with brackets. */ + + "files": + [ "tiny_obj_loader.h" ], + "publish": true +} + diff --git a/.travis.yml b/.travis.yml index f672abc..1768469 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,16 +51,17 @@ script: .. - ninja - ./test_loader ../cornell_box.obj -- if [ -n "$REPORT_COVERAGE" ]; then coveralls -b . -r .. -e examples -e tools -e jni - -e python -e images -E ".*CompilerId.*" -E ".*feature_tests.*" ; fi +- if [ -n "$REPORT_COVERAGE" ]; then coveralls -b . -r .. -e examples -e tools -e + jni -e python -e images -E ".*CompilerId.*" -E ".*feature_tests.*" ; fi - cd .. + +before_deploy: + - echo "Creating description file for bintray." + - ./tools/travis_postbuild.sh + deploy: - provider: releases - api_key: - secure: AsXameK4GJn6h6wMmDrKTr7q/o9EI7hX7zWg1W6VaFBQKfkBvOmjJolWimjl6HMoRZ1NpMmK5GDm3zBlTUeABtgVBIyNWgE9vWS39ff6D5iQKcgScFsJkyILt0GikBqbN2pLGQ2t/M1Qh6n1sEIfzqekiCcF5Qvy5yYlYvHtaRGV02QeYAej/xx15/9SMuKTncHhjf63ClYPu8ODid7QUegJUvlQUeXoPsBDbaXMH2uDWoBWF7etX7G2Iob4NE8GX+ZP6dj+Ogi7p4HXThK650mzLL/pUl584EjjY/vePqx0cFhtpiRwvrW8SNPI1aJ1Phwa1enLRUgfS3bnkwQAMw/SCXSK2lnCvkUAXyTgpG03HWrZURj4vhEPXc7qHooO+dsfmi+JanYLaSDyrGpgQznLGjCMnVATimry0KxSufUY8Wt72Wh+nf7N0IgTUCjl32sWnQd/MRZPkxFuaf1h7r9RoH9KZY0yIOV09gABEFCGrOIZA2FcyhC2G26Bc4zyNrfMFpZ2DI76qdcWNdJGkRkpxtH9sGU8JgZu6Em2f1e6+SLgkBsPxbhRk5PwdhA9AXE2p9PmQqhO3jJKusGBZSoHAF7TlwagRY2J01yJxF7ge6zG9U8QuBqs1bB1zdnE34fHWOgs4st3inC+oBDOhvnEg1Nm/qeYVWMBzpwclSg= - file: tiny_obj_loader.h - all_branches: true - on: - repo: syoyo/tinyobjloader - tags: true - skip_cleanup: true + provider: bintray + file: ".bintray.json" + user: "syoyo" + key: + secure: W4F1VZcDcVOMe8Ymvo0bHery/JSmVhadl1NgAnGus6o7zVw7ChElKA1ho/NtqUbtoW8o1qUKMJdLQeh786jolocZJEJlns9JZ5FCet6H2b3kITfUa4GR5T11V/ZYwL3SajW8vZ1xu5UrpP5HHgFMYtxb1MFrNLDI60sh0RnyV/qFFBnCJGZPagF/M1mzbJeDml5xK5lShH0r8QpH+7MeQ1J8ungEyJ7UCyr1ao8gY9eq1/05IpHR9vri/d48EXQWHbqtI8EwCc7064oCYQGyYcLsD4yPEokwrdelkCvDquSpJLmbJENfZCc4vZGXsykjnQ8+gltJomBAivQFB9vc06ETEJssMzitbrfEZUrqFwZj/HZM7CYGXfGQWltL828SppCjsuWrgQ/VYXM5UgRpmhlxbqnuyxnYvKZ9EDW4+EnMkOmIl7WSDovp8E/4CZ0ghs+YyFS4SrgeqFCXS8bvxrkDUUPSipHuGBOt02fRnccKzU+3zU6Q5fghyLczz4ZtnOdk+Niz/njyF0SZfPYTUgb3GzAJ8Su6kvWJCAGdedON3n1F/TtybCE2dIdATxaO2uFQbwYjSOCiq209oCJ7MrsQZibRsa5a9YXyjlLkPxwOeVwo8wJyJclqWswIkhdSO8xvTnkwESv4yLzLutEOlBVlQbJzpyuS6vx0yHOYkwc= diff --git a/tools/travis_postbuild.sh b/tools/travis_postbuild.sh new file mode 100755 index 0000000..5737d86 --- /dev/null +++ b/tools/travis_postbuild.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +DATEVAL=`date +%b-%d-%Y` +VERSIONVAL=master + +# Use tag as version +if [ $TRAVIS_TAG ]; then + VERSIONVAL=$TRAVIS_TAG +fi + +sed -e s%@DATE@%${DATEVAL}% .bintray.in > .bintray.tmp +sed -e s%@VERSION@%${VERSIONVAL}% .bintray.tmp > .bintray.json