build: misc clean-ups in make_nightly_build
This commit is contained in:
parent
7555331c1f
commit
87a72195d7
1 changed files with 14 additions and 12 deletions
|
@ -19,7 +19,7 @@ if [ -e "$DESTDIR" ]; then
|
|||
fi
|
||||
|
||||
if [ -e "$release_notes" ]; then
|
||||
echo file \"$release_notes\" already exists
|
||||
echo file \""$release_notes"\" already exists
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -31,7 +31,7 @@ if [ -n "$DIFF" ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
UNPUSHED="$(git log --pretty=oneline @{u}...)"
|
||||
UNPUSHED="$(git log --pretty=oneline '@{u}...')"
|
||||
|
||||
if [ -n "$UNPUSHED" ]; then
|
||||
echo there are unpushed commits:
|
||||
|
@ -41,12 +41,12 @@ fi
|
|||
|
||||
# get latest version tag from github releases api
|
||||
last_nightly_version=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep '"tag_name":' | cut -d'"' -f4)
|
||||
[ -z "last_nightly_version" ] && {
|
||||
[ -z "$last_nightly_version" ] && {
|
||||
echo "failed to fetch $title latest version"
|
||||
exit 1
|
||||
}
|
||||
|
||||
local_version="$(git --git-dir $BASEDIR/.git describe)"
|
||||
local_version="$(git --git-dir "$BASEDIR/.git" describe)"
|
||||
if [ "$local_version" == "$last_nightly_version" ]; then
|
||||
echo "$title is already at version $last_nightly_version"
|
||||
exit 1
|
||||
|
@ -101,10 +101,12 @@ echo
|
|||
|
||||
cd ..
|
||||
|
||||
echo $title > "$release_notes"
|
||||
echo > "$release_notes"
|
||||
echo "changes:" > "$release_notes"
|
||||
echo > "$release_notes"
|
||||
{
|
||||
echo "$title"
|
||||
echo "$release_notes"
|
||||
echo "changes:"
|
||||
echo
|
||||
} >"$release_notes"
|
||||
git log "${last_nightly_version}..HEAD" --pretty="format:%al %s" >>"$release_notes"
|
||||
cat "$release_notes"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue