Skip to content

Commit

Permalink
Merge pull request #92 from glerchundi/master
Browse files Browse the repository at this point in the history
use github-release instead of travis dpl
  • Loading branch information
glerchundi committed Oct 19, 2015
2 parents acf869e + 4cff7e7 commit 990d457
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
sudo: false
install:
- bash -e ${TRAVIS_BUILD_DIR}/.travis.yml.install
script:
- cd builder && RELEASE_VERSION="${TRAVIS_TAG:1}" ./build-latest
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: "XyKkvK7dmt9oVqcNaMojgw+vLQ0Q8VBf4K3LWgZHJJbPBUTrLRTNu5JXVB0kvmTZYSdVu7HHZ2LZJxsTac7frnzbMvNim0IfToJa4juW7fF50D+h84T1/T+fl4Q/OKWBDMW+GwhX4dSUygLAznojObwcxQjsSC5ARrBzlBpOjb0="
file:
- $HOME/dist/*.tar.gz
file_glob: true
on:
repo: just-containers/s6-overlay
branch: master
tags: true
- bash -e ${TRAVIS_BUILD_DIR}/.travis.yml.script
after_success:
- bash -e ${TRAVIS_BUILD_DIR}/.travis.yml.after_success
24 changes: 24 additions & 0 deletions .travis.yml.after_success
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e
set -x

# don't loop if files don't exist
shopt -s nullglob

# exit if TRAVIS_TAG is empty, no need to release anything
if [ -z "${TRAVIS_TAG}" ]; then
exit 0
fi

# get user and repo names
USERNAME=$(echo ${TRAVIS_REPO_SLUG} | cut -d"/" -f1)
REPONAME=$(echo ${TRAVIS_REPO_SLUG} | cut -d"/" -f2)

# release
./github-release release --user "${USERNAME}" --repo "${REPONAME}" --tag "${TRAVIS_TAG}" --name "${TRAVIS_TAG}"

# s6 overlay binaries
for i in $HOME/dist/*.tar.gz; do
name=$(basename ${i})
./github-release upload --user "${USERNAME}" --repo "${REPONAME}" --tag "${TRAVIS_TAG}" --name "${name}" --file "${i}"
done
7 changes: 7 additions & 0 deletions .travis.yml.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
set -x

# download and untar github-release
wget -nv -O github-release.amd64.tar.bz2 https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2
tar xf github-release.amd64.tar.bz2 --strip-components=3
5 changes: 5 additions & 0 deletions .travis.yml.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e
set -x

cd builder && RELEASE_VERSION="${TRAVIS_TAG:1}" ./build-latest

0 comments on commit 990d457

Please sign in to comment.