0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-25 12:50:54 +02:00

Add initial .travis.yml

This commit is contained in:
Tilo Spannagel 2017-03-14 10:48:58 +01:00
parent b9bae3112c
commit 8389d9659d
No known key found for this signature in database
GPG key ID: B89F1626A58E1429
2 changed files with 35 additions and 0 deletions

View file

@ -15,6 +15,7 @@ latests=( $(curl -sSL 'https://nextcloud.com/changelog/' |tac|tac| \
grep -o "\(Version\|Release\)\s\+[[:digit:]]\+\(\.[[:digit:]]\+\)\+" | \
awk '{ print $2 }' | sort -V ) )
travisEnv=
for latest in "${latests[@]}"; do
version=$(echo "$latest" | cut -d. -f1-2)
@ -44,5 +45,14 @@ for latest in "${latests[@]}"; do
# Copy the docker-entrypoint.
cp docker-entrypoint.sh "$version/$variant/docker-entrypoint.sh"
travisEnv='\n - VERSION='"$version"' VARIANT='"$variant$travisEnv"
done
done
# update .travis.yml
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
echo "$travis" > .travis.yml
# remove duplicate entries
echo "$(awk '!NF || !seen[$0]++' .travis.yml)" > .travis.yml