summaryrefslogtreecommitdiffstats
path: root/build/vue-builds.sh
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-10-01 07:29:11 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-10-02 17:26:07 +0200
commitb7d82e9262dca73f05d100fb77ccdea349807c1e (patch)
treebf29c3d33ee170edfd1685ed0c1fcb8d7a310b7d /build/vue-builds.sh
parent5cec23d840ed0adc10ea717a59df4e42bfbdbf30 (diff)
downloadnextcloud-server-b7d82e9262dca73f05d100fb77ccdea349807c1e.tar.gz
nextcloud-server-b7d82e9262dca73f05d100fb77ccdea349807c1e.zip
Bump check script
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'build/vue-builds.sh')
-rwxr-xr-xbuild/vue-builds.sh52
1 files changed, 35 insertions, 17 deletions
diff --git a/build/vue-builds.sh b/build/vue-builds.sh
index 782abe11a7c..b5198cbbc1f 100755
--- a/build/vue-builds.sh
+++ b/build/vue-builds.sh
@@ -8,29 +8,47 @@ then
echo "The build file $entryFile does not exists"
exit 2
else
- backupFile="$entryFile.orig"
path=$(dirname "$entryFile")
+ file=$(basename $entryFile)
- # Backup original file
- echo "Backing up $entryFile to $backupFile"
- cp $entryFile $backupFile
+ set -e
+ cd $path
+ echo "Entering $path"
+
+ # support for multiple chunks
+ for chunk in *$file; do
+
+ # Backup original file
+ backupFile="$chunk.orig"
+ echo "Backing up $chunk to $backupFile"
+ cp $chunk $backupFile
+
+ done
# Make the app
- set -e
- cd "$path/../"
- make
+ echo "Making $file"
+ cd ../
+ npm --silent install
+ npm run --silent build
# Reset
cd $root
+ cd $path
+
+ # support for multiple chunks
+ for chunk in *$file; do
+
+ # Compare build files
+ echo "Comparing $chunk to the original"
+ backupFile="$chunk.orig"
+ if ! diff -q $chunk $backupFile &>/dev/null
+ then
+ echo "$chunk build is NOT up-to-date! Please send the proper production build within the pull request"
+ cat $HOME/.npm/_logs/*.log
+ exit 2
+ else
+ echo "$chunk build is up-to-date"
+ fi
- # Compare build files
- echo "Comparing $entryFile to the original"
- if ! diff -q $entryFile $backupFile &>/dev/null
- then
- echo "$entryFile build is NOT up-to-date! Please send the proper production build within the pull request"
- cat $HOME/.npm/_logs/*.log
- exit 2
- else
- echo "$entryFile build is up-to-date"
- fi
+ done
fi