From 4dab55bec0ceb342852e63261362d4ec1e7b82bc Mon Sep 17 00:00:00 2001 From: matic_t Date: Thu, 9 Jul 2020 08:03:21 -0700 Subject: [PATCH] Comments + push default config.json --- .gitignore | 1 + build/build_and_upload.sh.template | 8 ++++++-- build/config.json | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 build/config.json diff --git a/.gitignore b/.gitignore index 8c8a0b3..a67997d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ build/* !build/Makefile !build/download_structure_conversions.sh !build/build_and_upload.sh.template +!build/config.json # using kdev4, works fairly nicely! .kdev4 **/*.kdev4 diff --git a/build/build_and_upload.sh.template b/build/build_and_upload.sh.template index eda8f30..6d8a63d 100755 --- a/build/build_and_upload.sh.template +++ b/build/build_and_upload.sh.template @@ -5,14 +5,18 @@ #VPS_USERNAME= user name inside vps #API_KEY= $(cat path/to/api/token/file) - +# Exit if no argument is passed on run if [[ -z "$1" ]]; then echo "Must provide plugin name in environment" 1>&2 exit 1 fi PLUGIN_NAME=$1 - +# Build the plugin API_KEY=$API_KEY make + +# zip all the required files and upload them to ssh tar czf - ./config.json ./bundle.js ./local.js ./main.css ./main.html | ssh $USERNAME -p $VPS_PASSWORD "cd plugins && mkdir $PLUGIN_NAME && cd $PLUGIN_NAME && tar xvzf -" + +# Create a simlink on VPS that will enable specific plugin on https://lexonomy.cjvt.si/ ssh -t $USERNAME -p $VPS_PASSWORD "sudo ln -s /home/$VPS_USERNAME/plugins/$PLUGIN_NAME /home/ozbolt/plugins/$PLUGIN_NAME" diff --git a/build/config.json b/build/config.json new file mode 100644 index 0000000..3f34b75 --- /dev/null +++ b/build/config.json @@ -0,0 +1,5 @@ +{ + "dependencies": [], "globals": [], + "javascript": "$LOCATION$/bundle.js", + "css": ["$LOCATION$/main.css"] +}