From a39e2dd96d902fef7959a9662a8e584a9311d00d Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 12 Mar 2018 10:38:52 +0100 Subject: [PATCH] added automatic deployment of packages via travis --- .travis.yml | 27 ++++++++++++++++--- README.md | 6 +++-- ...0.6.1.ebuild => mastodon-cpp-0.0.0.ebuild} | 2 +- 3 files changed, 28 insertions(+), 7 deletions(-) rename packages/gentoo/{mastodon-cpp-0.6.1.ebuild => mastodon-cpp-0.0.0.ebuild} (92%) diff --git a/.travis.yml b/.travis.yml index fff4ec1..9f88f7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,12 +10,31 @@ addons: packages: - g++-5 - libcurlpp-dev -api_key: - secure: "QxqO8SkFDG1XzbFUhZRmP+13t0ASwBfW75H9iO6f6N9CICUV1jx8jxtIb5QGRRwxl6c+WHUgk79ApU38x3cw4NPXU8kCgXPpSHUMJM2+8C7HFKuaaAzANoU1M24o5dfsxq0ocHlxC8Dz1BH6WoawK57L2f0AIx1kOYO3k7IxjgzEBXusTTJSU7bxfPDV6jqdpnL+ihflrM2kHf9w5eeHrwFFKxT0dN1zXvyPg2XJZPCviyXFZFMfEtTBRta06/e7Y/JHRB69Plt5wiLX+syONuXIFZMEoTVbFjpw1+StAymvtV0PCGoetnhOK7eTOAnHFns7k9lhwuHMqtzPNDN3uEtsmb/gf+Nydr7xatLDwWtEANZUdIxfae0kG83H+SSpjzB/8C5Cgb2ywF9wZEWwBElpRQ1Q0Y6n5IbCaOKw2d+OuqlPIJ8Gs79fq5p5lZGP1O5t9uXyVEY53GQKCFdBGGo8A5+D5l12wy41XaMmq0t3t3kX6pUmYzQG+dWl44nDygmyy6ze98vg8sNTSsqCsJeI7RRJY+n4EJg5KIvRo9PEk77kYd+mPjRUsW8SnL7pCwL+zQ7nh3rYnlkqtzJLFpESV687YrOqngvnK600oA+eZ8tySPmFKb9n8ulpA6+RKva51MRkyFMnHh529VLmO495PyAUi/eeKSIM0qwnhvQ=" + - libboost-all-dev before_install: - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 60 script: - mkdir -p build && cd build - - cmake .. + - cmake -DWITH_EXAMPLES=ON .. - make VERBOSE=1 - - sudo make install + - sudo make install && cd .. + +before_deploy: + - cp -v packages/gentoo/mastodon-cpp-{0.0.0,${TRAVIS_TAG}}.ebuild + - cd build + - cmake -DWITH_DEB=ON .. + - make package + - cmake -DWITH_DEB=OFF -DWITH_RPM=ON .. + - make package +deploy: + provider: releases + api_key: + secure: "QxqO8SkFDG1XzbFUhZRmP+13t0ASwBfW75H9iO6f6N9CICUV1jx8jxtIb5QGRRwxl6c+WHUgk79ApU38x3cw4NPXU8kCgXPpSHUMJM2+8C7HFKuaaAzANoU1M24o5dfsxq0ocHlxC8Dz1BH6WoawK57L2f0AIx1kOYO3k7IxjgzEBXusTTJSU7bxfPDV6jqdpnL+ihflrM2kHf9w5eeHrwFFKxT0dN1zXvyPg2XJZPCviyXFZFMfEtTBRta06/e7Y/JHRB69Plt5wiLX+syONuXIFZMEoTVbFjpw1+StAymvtV0PCGoetnhOK7eTOAnHFns7k9lhwuHMqtzPNDN3uEtsmb/gf+Nydr7xatLDwWtEANZUdIxfae0kG83H+SSpjzB/8C5Cgb2ywF9wZEWwBElpRQ1Q0Y6n5IbCaOKw2d+OuqlPIJ8Gs79fq5p5lZGP1O5t9uXyVEY53GQKCFdBGGo8A5+D5l12wy41XaMmq0t3t3kX6pUmYzQG+dWl44nDygmyy6ze98vg8sNTSsqCsJeI7RRJY+n4EJg5KIvRo9PEk77kYd+mPjRUsW8SnL7pCwL+zQ7nh3rYnlkqtzJLFpESV687YrOqngvnK600oA+eZ8tySPmFKb9n8ulpA6+RKva51MRkyFMnHh529VLmO495PyAUi/eeKSIM0qwnhvQ=" + file: + - "packages/gentoo/mastodon-cpp-${TRAVIS_TAG}.ebuild" + - "libmastodon-cpp_${TRAVIS_TAG}-0_amd64.deb" + - "libmastodon-cpp-${TRAVIS_TAG}-0.x86_64.rpm" + skip_cleanup: true + on: + tags: true + condition: $CC = gcc diff --git a/README.md b/README.md index dcfa81d..263361e 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,9 @@ You can run the tests with `ctest ..` inside the build directory. ### Gentoo -Put the ebuild in `packages/gentoo` into your [local overlay](https://wiki.gentoo.org/wiki/Custom_repository). +Put the ebuild in `packages/gentoo` into your [local overlay](https://wiki.gentoo.org/wiki/Custom_repository) and rename it to match the desired version. + +Or use the ebuild from the [releases](https://github.com/tastytea/mastodon-cpp/releases) page. ### DEB and RPM @@ -59,7 +61,7 @@ Run `make package` from the build directory to generate a DEB/RPM package. RPM packages are untested and DEB packages are tested sporadically. To use the DEB package on stretch, you will need [libcurlpp0](https://packages.debian.org/de/libcurlpp0) from buster or jessie. -Prebuilt packages for x86_64(amd64) are provided with each release. +Prebuilt packages for x86_64(amd64) are provided with each [release](https://github.com/tastytea/mastodon-cpp/releases). ### Other diff --git a/packages/gentoo/mastodon-cpp-0.6.1.ebuild b/packages/gentoo/mastodon-cpp-0.0.0.ebuild similarity index 92% rename from packages/gentoo/mastodon-cpp-0.6.1.ebuild rename to packages/gentoo/mastodon-cpp-0.0.0.ebuild index bf39247..09ac7e1 100644 --- a/packages/gentoo/mastodon-cpp-0.6.1.ebuild +++ b/packages/gentoo/mastodon-cpp-0.0.0.ebuild @@ -3,7 +3,7 @@ inherit cmake-utils DESCRIPTION="mastodon-cpp is a C++ wrapper for the Mastodon API." HOMEPAGE="https://github.com/tastytea/mastodon-cpp" -SRC_URI="https://github.com/tastytea/mastodon-cpp/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/tastytea/mastodon-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS=""