Skip to content

Commit

Permalink
Update .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Mar 4, 2016
1 parent 9430efc commit c17d3e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ language: bash
services: docker

env:
- VERSION=10.0
- VERSION=5.5
- VERSION=10.1
- VERSION=10.0

install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
Expand Down
9 changes: 7 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

declare -A suites=(
[5.5]='wheezy'
Expand All @@ -14,7 +14,7 @@ if [ ${#versions[@]} -eq 0 ]; then
fi
versions=( "${versions[@]%/}" )


travisEnv=
for version in "${versions[@]}"; do
suite="${suites[$version]:-$defaultSuite}"
fullVersion="$(curl -sSL "http://ftp.osuosl.org/pub/mariadb/repo/$version/debian/dists/$suite/main/binary-amd64/Packages" |tac|tac| grep -m1 -A10 "^Package: mariadb-server\$" | grep -m1 '^Version: ' | cut -d' ' -f2)"
Expand All @@ -31,4 +31,9 @@ for version in "${versions[@]}"; do
s/%%MARIADB_VERSION%%/'"$fullVersion"'/g;
' Dockerfile.template > "$version/Dockerfile"
)

travisEnv='\n - VERSION='"$version$travisEnv"
done

travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
echo "$travis" > .travis.yml

0 comments on commit c17d3e8

Please sign in to comment.