Skip to content

Commit

Permalink
update: check return code
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho committed Nov 16, 2017
1 parent 29109ba commit 206b6de
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
13 changes: 7 additions & 6 deletions bin/ncp-update
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 7 additions & 6 deletions build-devel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() { :; }
Expand Down
10 changes: 7 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand Down

0 comments on commit 206b6de

Please sign in to comment.