Skip to content

Commit

Permalink
Show differences after fetching of versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Jun 14, 2019
1 parent e7b9f7e commit 08dbc99
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions do-release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,29 @@ fi

set -e

echo "Reading package versions..."
show_diff() {
PREVIOUS="${!2/-g*/}"
source Makefile.versions.mk
NEW="${!2/-g*/}"

if [[ "${PREVIOUS}" != "${NEW}" ]]; then
echo "- https://github.com/ayufan-rock64/$1/compare/${PREVIOUS}..${NEW}"
fi
}

git checkout Makefile.versions.mk
source Makefile.versions.mk
make generate-versions > Makefile.versions.mk

echo "Differences:"
( show_diff linux-u-boot LATEST_UBOOT_VERSION )
( show_diff linux-kernel LATEST_KERNEL_VERSION )
( show_diff linux-package LATEST_PACKAGE_VERSION )

echo "OK?"
read PROMPT

echo "Edit changeset:"
if which editor &>/dev/null; then
editor RELEASE.md
Expand All @@ -55,13 +78,6 @@ fi
echo "OK?"
read PROMPT

echo "Reading package versions..."
make generate-versions > Makefile.versions.mk
cat Makefile.versions.mk

echo "OK?"
read PROMPT

echo "Adding changes..."
git add RELEASE.md Makefile.versions.mk

Expand Down

0 comments on commit 08dbc99

Please sign in to comment.