From 206b6de97489247b34ce05bb5cb628b0ef2fefff Mon Sep 17 00:00:00 2001 From: nacho Date: Thu, 16 Nov 2017 19:27:00 +0100 Subject: [PATCH] update: check return code --- bin/ncp-update | 13 +++++++------ build-devel.sh | 13 +++++++------ changelog.md | 10 +++++++--- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/bin/ncp-update b/bin/ncp-update index 615595f0d..54f6a23e5 100755 --- a/bin/ncp-update +++ b/bin/ncp-update @@ -11,17 +11,18 @@ cd /tmp/ncp-update-tmp echo -e "Performing updates" - ./update.sh + ./update.sh && { - VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" ) - grep -qP "v\d+\.\d+\.\d+" <<< "$VER" && { # check format - echo "$VER" > /usr/local/etc/ncp-version - echo "$VER" > /var/run/.ncp-latest-version + VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" ) + grep -qP "v\d+\.\d+\.\d+" <<< "$VER" && { # check format + echo "$VER" > /usr/local/etc/ncp-version + echo "$VER" > /var/run/.ncp-latest-version + } + echo -e "NextCloudPi updated to version $VER" } cd / rm -rf /tmp/ncp-update-tmp - echo -e "NextCloudPi updated to version $VER" exit } # force to read the whole thing into memory, as its contents might change in update.sh diff --git a/build-devel.sh b/build-devel.sh index d8c0dd1d1..489f6bd09 100644 --- a/build-devel.sh +++ b/build-devel.sh @@ -31,18 +31,19 @@ install() cd /tmp/ncp-update-tmp || return 1 echo -e "Performing updates" - ./update.sh + ./update.sh && { - VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" ) - grep -qP "v\d+\.\d+\.\d+" <<< $VER && { # check format - echo "$VER" > /usr/local/etc/ncp-version - echo "$VER" > /var/run/.ncp-latest-version + VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" ) + grep -qP "v\d+\.\d+\.\d+" <<< $VER && { # check format + echo "$VER" > /usr/local/etc/ncp-version + echo "$VER" > /var/run/.ncp-latest-version + } + echo -e "NextCloudPi updated to version $VER" } cd / || return 1 rm -rf /tmp/ncp-update-tmp - echo -e "NextCloudPi updated to version $VER" } cleanup() { :; } diff --git a/changelog.md b/changelog.md index c27055e3f..1fba55a78 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ -[v0.34.12](https://github.com/nextcloud/nextcloudpi/commit/58173ad) (2017-11-16) fail2ban: fix accidentally deleted line +[v0.34.14](https://github.com/nextcloud/nextcloudpi/commit/723d51b) (2017-11-16) update: check return code + +[v0.34.13](https://github.com/nextcloud/nextcloudpi/commit/29109ba) (2017-11-16) improve IP detection + +[v0.34.12](https://github.com/nextcloud/nextcloudpi/commit/c4a0bba) (2017-11-16) fail2ban: fix accidentally deleted line [v0.34.11](https://github.com/nextcloud/nextcloudpi/commit/634bc33) (2017-11-15) ncp-web: only show wizard button if it exists, delete from docker @@ -11,9 +15,9 @@ [v0.34.7 ](https://github.com/nextcloud/nextcloudpi/commit/638ff3c) (2017-11-12) redis: fix update bug -[v0.34.6, devel](https://github.com/nextcloud/nextcloudpi/commit/c2f23ef) (2017-11-11) redis: fix socket permissions +[v0.34.6 ](https://github.com/nextcloud/nextcloudpi/commit/c2f23ef) (2017-11-11) redis: fix socket permissions -[v0.34.5](https://github.com/nextcloud/nextcloudpi/commit/9e48e92) (2017-11-10) update: wait running apt processes (fix) +[v0.34.5 ](https://github.com/nextcloud/nextcloudpi/commit/9e48e92) (2017-11-10) update: wait running apt processes (fix) [v0.34.4 ](https://github.com/nextcloud/nextcloudpi/commit/b6538b9) (2017-11-09) redis: fixes with ramlogs and modsecurity