blob: 108f29ed76e6aad95def88ea6e6662122a3e7f08 [file] [log] [blame]
Mike Dillon8eed4f72015-03-13 22:06:53 -07001#!/bin/bash
Nicolas De Loof58826312014-11-28 10:52:05 +01002set -e
3
4declare -A aliases
5aliases=(
Nicolas De Loofb7850f22015-03-03 11:02:40 +01006 [1.600]='weekly'
7 [1.580.3]='latest'
Nicolas De Loof58826312014-11-28 10:52:05 +01008)
9
10versions=( */ )
11versions=( "${versions[@]%/}" )
Mike Dillon8eed4f72015-03-13 22:06:53 -070012versions=( $(IFS=$'\n'; sort -Vr <<< "${versions[*]}") )
Nicolas De Loof58826312014-11-28 10:52:05 +010013url='git://github.com/cloudbees/jenkins-ci.org-docker'
14
Nicolas De Loofc164ea12014-12-02 16:48:59 +010015echo '# maintainer: Nicolas De Loof <nicolas.deloof@gmail.com> (@ndeloof)'
16echo '# maintainer: Michael Neale <mneale@cloudbees.com> (@michaelneale)'
Nicolas De Loof58826312014-11-28 10:52:05 +010017
Nicolas De Loofc164ea12014-12-02 16:48:59 +010018echo
Mike Dillon8eed4f72015-03-13 22:06:53 -070019echo "# group: Current Releases"
20for 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 Loof58826312014-11-28 10:52:05 +010023 echo "$va: ${url}@${commit} $version"
24 done
Mike Dillon8eed4f72015-03-13 22:06:53 -070025 echo
26done
27
28echo "# group: Previous LTS Releases"
29for 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"
36done
37echo
38
39echo "# group: Previous Weekly Releases"
40for 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 Loof58826312014-11-28 10:52:05 +010047done