aboutsummaryrefslogtreecommitdiffstats
path: root/build/vue-builds.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/vue-builds.sh')
-rwxr-xr-xbuild/vue-builds.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/build/vue-builds.sh b/build/vue-builds.sh
new file mode 100755
index 00000000000..4b3ea560fa2
--- /dev/null
+++ b/build/vue-builds.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+declare -a apps=("./settings/js/main.js" "./apps/updatenotification/js/merged.js")
+root=$(pwd)
+entryFile=$1
+
+if [ ! -f "$entryFile" ]
+then
+ echo "The build file $entryFile does not exists"
+ exit 2
+else
+ backupFile="$entryFile.orig"
+ path=$(dirname "$entryFile")
+
+ # Backup original file
+ echo "Backing up $entryFile to $backupFile"
+ cp $entryFile $backupFile
+
+ # Make the app
+ set -e
+ cd "$path/../"
+ make
+
+ # Reset
+ cd $root
+
+ # 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
+fi