Mike Dillon | 8eed4f7 | 2015-03-13 22:06:53 -0700 | [diff] [blame^] | 1 | #!/bin/bash |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 2 | set -e |
| 3 | |
| 4 | declare -A aliases |
| 5 | aliases=( |
Nicolas De Loof | b7850f2 | 2015-03-03 11:02:40 +0100 | [diff] [blame] | 6 | [1.600]='weekly' |
| 7 | [1.580.3]='latest' |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 8 | ) |
| 9 | |
| 10 | versions=( */ ) |
| 11 | versions=( "${versions[@]%/}" ) |
Mike Dillon | 8eed4f7 | 2015-03-13 22:06:53 -0700 | [diff] [blame^] | 12 | versions=( $(IFS=$'\n'; sort -Vr <<< "${versions[*]}") ) |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 13 | url='git://github.com/cloudbees/jenkins-ci.org-docker' |
| 14 | |
Nicolas De Loof | c164ea1 | 2014-12-02 16:48:59 +0100 | [diff] [blame] | 15 | echo '# maintainer: Nicolas De Loof <nicolas.deloof@gmail.com> (@ndeloof)' |
| 16 | echo '# maintainer: Michael Neale <mneale@cloudbees.com> (@michaelneale)' |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 17 | |
Nicolas De Loof | c164ea1 | 2014-12-02 16:48:59 +0100 | [diff] [blame] | 18 | echo |
Mike Dillon | 8eed4f7 | 2015-03-13 22:06:53 -0700 | [diff] [blame^] | 19 | echo "# group: Current Releases" |
| 20 | for current in $(IFS=$'\n'; sort -V <<< "${!aliases[*]}"); do |
| 21 | commit="$(git log -1 --format='format:%H' -- "$current")" |
| 22 | for va in "$current" ${aliases[$current]}; do |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 23 | echo "$va: ${url}@${commit} $version" |
| 24 | done |
Mike Dillon | 8eed4f7 | 2015-03-13 22:06:53 -0700 | [diff] [blame^] | 25 | echo |
| 26 | done |
| 27 | |
| 28 | echo "# group: Previous LTS Releases" |
| 29 | for version in "${versions[@]}"; do |
| 30 | if [[ "${aliases[$version]}" || "$version" != *.*.* ]]; then |
| 31 | continue |
| 32 | fi |
| 33 | |
| 34 | commit="$(git log -1 --format='format:%H' -- "$version")" |
| 35 | echo "$version: ${url}@${commit} $version" |
| 36 | done |
| 37 | echo |
| 38 | |
| 39 | echo "# group: Previous Weekly Releases" |
| 40 | for version in "${versions[@]}"; do |
| 41 | if [[ "${aliases[$version]}" || "$version" == *.*.* ]]; then |
| 42 | continue |
| 43 | fi |
| 44 | |
| 45 | commit="$(git log -1 --format='format:%H' -- "$version")" |
| 46 | echo "$version: ${url}@${commit} $version" |
Nicolas De Loof | 5882631 | 2014-11-28 10:52:05 +0100 | [diff] [blame] | 47 | done |