diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-12-05 19:41:53 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-12-05 19:42:24 +0300 |
commit | 3fedf4f432521b56b5f8040e5a8f3de0675dfc00 (patch) | |
tree | 17fa8e39b1ec818d55e67a85bb9b7afee2a45ea2 | |
parent | 3896b7f5300226812dba383b1af5cdcaaa8b012f (diff) |
ncp-config: show changelog on updatesv0.41.6
-rwxr-xr-x | bin/ncp-check-version | 9 | ||||
-rwxr-xr-x | bin/ncp-update | 7 | ||||
-rwxr-xr-x | bin/nextcloudpi-config | 7 | ||||
-rw-r--r-- | changelog.md | 6 |
4 files changed, 25 insertions, 4 deletions
diff --git a/bin/ncp-check-version b/bin/ncp-check-version index 5075edfb..ed5072c5 100755 --- a/bin/ncp-check-version +++ b/bin/ncp-check-version @@ -6,12 +6,21 @@ ping -W 2 -w 1 -q github.com &>/dev/null || { echo "No internet connectivity"; exit 1; } +rm -rf /tmp/ncp-check-tmp + git clone --depth 20 -q --bare https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-check-tmp || exit 1 cd /tmp/ncp-check-tmp || exit 1 VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" ) grep -qP "v\d+\.\d+\.\d+" <<< "$VER" && { # check format echo "$VER" > /var/run/.ncp-latest-version + + # write changelog + git log --graph --oneline --decorate \ + --pretty=format:"[%D] %s" --date=short | \ + grep 'tag: v' | \ + sed '/HEAD ->\|origin/s|\[.*\(tag: v[0-9]\+\.[0-9]\+\.[0-9]\+\).*\]|[\1]|' | \ + sed 's|* \[tag: |[|' > /usr/local/etc/ncp-changelog } cd / || exit 1 diff --git a/bin/ncp-update b/bin/ncp-update index 54f6a23e..9456819c 100755 --- a/bin/ncp-update +++ b/bin/ncp-update @@ -17,6 +17,13 @@ grep -qP "v\d+\.\d+\.\d+" <<< "$VER" && { # check format echo "$VER" > /usr/local/etc/ncp-version echo "$VER" > /var/run/.ncp-latest-version + + # write changelog + git log --graph --oneline --decorate \ + --pretty=format:"[%D] %s" --date=short | \ + grep 'tag: v' | \ + sed '/HEAD ->\|origin/s|\[.*\(tag: v[0-9]\+\.[0-9]\+\.[0-9]\+\).*\]|[\1]|' | \ + sed 's|* \[tag: |[|' > /usr/local/etc/ncp-changelog } echo -e "NextCloudPi updated to version $VER" } diff --git a/bin/nextcloudpi-config b/bin/nextcloudpi-config index d914121d..f247e516 100755 --- a/bin/nextcloudpi-config +++ b/bin/nextcloudpi-config @@ -26,11 +26,14 @@ function nextcloud-config() test -f $VERFILE || ncp-check-version # ask for update if outdated + + test -f /usr/local/etc/ncp-changelog && \ + local CHANGELOG=$( head -4 /usr/local/etc/ncp-changelog ) ncp-test-updates && \ whiptail --backtitle "$BACKTITLE $( cat /usr/local/etc/ncp-version )" \ --title "NextCloudPi update available" \ - --clear --yesno "Update to $( cat $VERFILE )?\n\n\n\nSee changes at\n\nhttps://github.com/nextcloud/nextcloudpi/blob/master/changelog.md" \ - 20 70 + --clear --yesno "Update to $( cat $VERFILE )?\n\n$CHANGELOG" \ + 15 70 [[ $? -eq $DIALOG_OK ]] && ncp-update while true; do diff --git a/changelog.md b/changelog.md index 3689b511..456d6f2e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,11 @@ -[v0.41.5](https://github.com/nextcloud/nextcloudpi/commit/b174061) (2017-12-05) nc-database: accept BTRFS filesystems +[v0.41.6](https://github.com/nextcloud/nextcloudpi/commit/c7c709a) (2017-12-05) ncp-config: show changelog on updates + +[v0.41.5](https://github.com/nextcloud/nextcloudpi/commit/0fe56d8) (2017-12-05) nc-database: accept BTRFS filesystems [v0.41.4 ](https://github.com/nextcloud/nextcloudpi/commit/231ede0) (2017-11-29) nc-limits: added PHP threads and Redis mem limits -[v0.41.3](https://github.com/nextcloud/nextcloudpi/commit/1014845) (2017-12-05) SSH: enhance security +[v0.41.3 ](https://github.com/nextcloud/nextcloudpi/commit/1014845) (2017-12-05) SSH: enhance security [v0.41.2 ](https://github.com/nextcloud/nextcloudpi/commit/a2c5de7) (2017-12-04) nc-automount: check for USBdrive labeled drive case |