release.sh: website: fix feeding the latest stable and rc
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
		| @@ -257,17 +257,19 @@ function git_release () { | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| function get_last_rc () { | function get_last_rc () { | ||||||
|   git tag | grep -E '^v([0-9][\.-]){3}rc' | sort -n | tail -n1 |   git tag | grep -E '^v([0-9][\.-]){3}rc' | sort -n | tail -n1 | ||||||
| } | } | ||||||
|  |  | ||||||
| # | function get_last_stable () { | ||||||
| # $1: new version |   git tag | grep -E '^v([0-9][\.])+' | grep -v '\-rc' | sort -n | tail -n1 | ||||||
| # | } | ||||||
|  |  | ||||||
| function update_website_releases_info() { | function update_website_releases_info() { | ||||||
|   cat > "$WEBSITE_LATEST" <<EOF |   cat > "$WEBSITE_LATEST" <<EOF | ||||||
| # DO NOT EDIT MANUALLY: it is generated by a script (release.sh) | # DO NOT EDIT MANUALLY: it is generated by a script (release.sh) | ||||||
| stable: $1 | stable: $(get_last_stable) | ||||||
| rc: $(get_last_rc) | rc: $(get_last_rc) | ||||||
| EOF | EOF | ||||||
| } | } | ||||||
| @@ -277,7 +279,6 @@ EOF | |||||||
| # | # | ||||||
| function update_website () { | function update_website () { | ||||||
|   debug 'in update_website' |   debug 'in update_website' | ||||||
|   update_website_releases_info $1 |  | ||||||
|  |  | ||||||
|   ask "update API of the website? (require $SPHINXBUILD)" |   ask "update API of the website? (require $SPHINXBUILD)" | ||||||
|   if test $? -eq $Yes |   if test $? -eq $Yes | ||||||
| @@ -289,6 +290,8 @@ function update_website () { | |||||||
|         echo "git stash create 'WIP during offlineimap API import'" |         echo "git stash create 'WIP during offlineimap API import'" | ||||||
|         git stash create 'WIP during offlineimap API import' |         git stash create 'WIP during offlineimap API import' | ||||||
|       } |       } | ||||||
|  |  | ||||||
|  |       update_website_releases_info | ||||||
|       cd "../$DOCSDIR" |       cd "../$DOCSDIR" | ||||||
|       make websitedoc && { |       make websitedoc && { | ||||||
|         cd ../website && { |         cd ../website && { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Nicolas Sebrecht
					Nicolas Sebrecht