Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2019-01-10 07:56:05 +0300
committernachoparker <nacho@ownyourbits.com>2019-01-10 07:56:42 +0300
commit9de1f51a3deadea6dd90f5385c54296780e03448 (patch)
tree9cdfed046a426c6ea9fa1307d4b968c0fae80c6d /bin/ncp-update
parent2e7da45f687c00f29ced3caab9e98433f2169160 (diff)
build: stop at any error
Diffstat (limited to 'bin/ncp-update')
-rwxr-xr-xbin/ncp-update34
1 files changed, 16 insertions, 18 deletions
diff --git a/bin/ncp-update b/bin/ncp-update
index 6d3e3556..a68afc26 100755
--- a/bin/ncp-update
+++ b/bin/ncp-update
@@ -20,25 +20,23 @@
[[ -f /.ncp-image ]] || cd "$TMPDIR" # update locally during build
echo -e "Performing updates"
- ./update.sh && {
-
- cd "$TMPDIR"
- 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
-
- # 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"
+ ./update.sh || exit 1
+
+ cd "$TMPDIR"
+ 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
+
+ # 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
+ echo -e "NextCloudPi updated to version $VER"
+ exit 0
} # force to read the whole thing into memory, as its contents might change in update.sh