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=( |
Nicolas De Loof | 0b88a12 | 2015-01-05 10:38:37 +0100 | [diff] [blame] | 6 | [1.596]='weekly' |
| 7 | [1.580.2]='latest' |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 8 | ) |
| 9 | |
| 10 | versions=( */ ) |
| 11 | versions=( "${versions[@]%/}" ) |
| 12 | url='git://github.com/cloudbees/jenkins-ci.org-docker' |
| 13 | |
Nicolas De Loof | c164ea1 | 2014-12-02 16:48:59 +0100 | [diff] [blame] | 14 | echo '# maintainer: Nicolas De Loof <nicolas.deloof@gmail.com> (@ndeloof)' |
| 15 | echo '# maintainer: Michael Neale <mneale@cloudbees.com> (@michaelneale)' |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 16 | |
Nicolas De Loof | c164ea1 | 2014-12-02 16:48:59 +0100 | [diff] [blame] | 17 | echo |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 18 | for version in "${versions[@]}"; do |
| 19 | commit="$(git log -1 --format='format:%H' -- "$version")" |
| 20 | versionAliases=( $version ${aliases[$version]} ) |
| 21 | |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 22 | for va in "${versionAliases[@]}"; do |
| 23 | echo "$va: ${url}@${commit} $version" |
| 24 | done |
| 25 | done |