Skip to content

Commit

Permalink
.travis.yml: Small improvements for if statement and apt-get install. (
Browse files Browse the repository at this point in the history
  • Loading branch information
junaruga authored and lafin committed Apr 7, 2019
1 parent 9d7028f commit 20674ec
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
dist: xenial
services: docker
language: bash
addons:
apt:
config:
retries: true
update: true
packages:
- jq
- rpm2cpio
- cpio
env:
global:
- VERSION=3.1.0-3
- REPO=multiarch/qemu-user-static
- PACKAGE_URI="https://kojipkgs.fedoraproject.org/packages/qemu/3.1.0/6.fc30/x86_64/qemu-user-static-3.1.0-6.fc30.x86_64.rpm"
- PACKAGE_FILENAME=$(basename "$PACKAGE_URI")
before_script:
- sudo apt-get install jq rpm2cpio cpio
- wget --content-disposition $PACKAGE_URI
- rpm2cpio $PACKAGE_FILENAME | cpio -dimv
script:
- ./generate_tarballs.sh
- |
if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then
./publish.sh -v "$VERSION" -t "$GITHUB_TOKEN" -r "$REPO" && ./update.sh -v "$VERSION" -r "$REPO";
./publish.sh -v "$VERSION" -t "$GITHUB_TOKEN" -r "$REPO" && \
./update.sh -v "$VERSION" -r "$REPO"
fi
after_success:
- |
if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker push $REPO;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && \
docker push $REPO
fi

0 comments on commit 20674ec

Please sign in to comment.