Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame^] | 1 | #!/usr/local/Cellar/bash/4.3.30/bin/bash |
| 2 | set -e |
| 3 | |
| 4 | declare -A aliases |
| 5 | aliases=( |
| 6 | [1.592]='weekly' |
| 7 | [1.580.1]='latest' |
| 8 | ) |
| 9 | |
| 10 | versions=( */ ) |
| 11 | versions=( "${versions[@]%/}" ) |
| 12 | url='git://github.com/cloudbees/jenkins-ci.org-docker' |
| 13 | |
| 14 | echo '# maintainer: Nicolas De Loof <nicolas.deloof@gmail.com> (@ndeloo)' |
| 15 | |
| 16 | for version in "${versions[@]}"; do |
| 17 | commit="$(git log -1 --format='format:%H' -- "$version")" |
| 18 | versionAliases=( $version ${aliases[$version]} ) |
| 19 | |
| 20 | echo |
| 21 | for va in "${versionAliases[@]}"; do |
| 22 | echo "$va: ${url}@${commit} $version" |
| 23 | done |
| 24 | done |