contrib/release.sh: fix latest.yml update
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
548fa6e57f
commit
ad12c125a4
@ -271,6 +271,7 @@ rc: $(get_last_rc)
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# $1: new version
|
# $1: new version
|
||||||
#
|
#
|
||||||
@ -280,35 +281,50 @@ function update_website () {
|
|||||||
ask "update API of the website? (require $SPHINXBUILD)"
|
ask "update API of the website? (require $SPHINXBUILD)"
|
||||||
if test $? -eq $Yes
|
if test $? -eq $Yes
|
||||||
then
|
then
|
||||||
$SPHINXBUILD --version > /dev/null 2>&1 && {
|
# Check sphinx is available.
|
||||||
cd website || echo "ERROR: cannot go to website"
|
$SPHINXBUILD --version > /dev/null 2>&1
|
||||||
git diff --quiet 2>/dev/null && git diff --quiet --cached 2>/dev/null || {
|
if test ! $? -eq 0
|
||||||
echo "There is WIP in the website repository, stashing"
|
then
|
||||||
echo "git stash create 'WIP during offlineimap API import'"
|
|
||||||
git stash create 'WIP during offlineimap API import'
|
|
||||||
}
|
|
||||||
|
|
||||||
update_website_releases_info
|
|
||||||
cd "../$DOCSDIR"
|
|
||||||
make websitedoc && {
|
|
||||||
cd ../website && {
|
|
||||||
branch_name="import-$1"
|
|
||||||
git checkout -b "$branch_name"
|
|
||||||
git add '_doc/versions'
|
|
||||||
git commit -a -s -m"update for offlineimap $1"
|
|
||||||
git checkout master
|
|
||||||
echo "website: branch '$branch_name' ready for a merge in master!"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} || {
|
|
||||||
echo "Oops! you don't have $SPHINXBUILD installed?"
|
echo "Oops! you don't have $SPHINXBUILD installed?"
|
||||||
echo "Cannot update the webite documentation..."
|
echo "Cannot update the webite documentation..."
|
||||||
echo "You should install it and run:"
|
echo "You should install it and run:"
|
||||||
echo " $ cd docs"
|
echo " $ cd docs"
|
||||||
echo " $ make websitedoc"
|
echo " $ make websitedoc"
|
||||||
echo "Then, commit and push changes of the website."
|
echo "Then, commit and push changes of the website."
|
||||||
|
ask 'continue'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check website sources are available.
|
||||||
|
cd website
|
||||||
|
if test ! $? -eq 0
|
||||||
|
then
|
||||||
|
echo "ERROR: cannot go to the website sources"
|
||||||
|
ask 'continue'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
# Stash any WIP in the website sources.
|
||||||
|
git diff --quiet 2>/dev/null && git diff --quiet --cached 2>/dev/null || {
|
||||||
|
echo "There is WIP in the website repository, stashing"
|
||||||
|
echo "git stash create 'WIP during offlineimap API import'"
|
||||||
|
git stash create 'WIP during offlineimap API import'
|
||||||
|
ask 'continue'
|
||||||
}
|
}
|
||||||
ask 'continue'
|
|
||||||
|
cd .. # Back to offlineimap.git.
|
||||||
|
update_website_releases_info
|
||||||
|
cd "./$DOCSDIR" # Enter the docs directory in offlineimap.git.
|
||||||
|
# Build the docs!
|
||||||
|
make websitedoc && {
|
||||||
|
# Commit changes in a branch.
|
||||||
|
cd ../website # Enter the website sources.
|
||||||
|
branch_name="import-$1"
|
||||||
|
git checkout -b "$branch_name"
|
||||||
|
git add '_doc/versions'
|
||||||
|
git commit -a -s -m"update for offlineimap $1"
|
||||||
|
echo "website: branch '$branch_name' ready for a merge in master!"
|
||||||
|
}
|
||||||
|
ask 'website updated locally; continue'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user