Comments + push default config.json

This commit is contained in:
matic_t 2020-07-09 08:03:21 -07:00
parent c79679719f
commit 4dab55bec0
3 changed files with 12 additions and 2 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ build/*
!build/Makefile !build/Makefile
!build/download_structure_conversions.sh !build/download_structure_conversions.sh
!build/build_and_upload.sh.template !build/build_and_upload.sh.template
!build/config.json
# using kdev4, works fairly nicely! # using kdev4, works fairly nicely!
.kdev4 .kdev4
**/*.kdev4 **/*.kdev4

View File

@ -5,14 +5,18 @@
#VPS_USERNAME= user name inside vps #VPS_USERNAME= user name inside vps
#API_KEY= $(cat path/to/api/token/file) #API_KEY= $(cat path/to/api/token/file)
# Exit if no argument is passed on run
if [[ -z "$1" ]]; then if [[ -z "$1" ]]; then
echo "Must provide plugin name in environment" 1>&2 echo "Must provide plugin name in environment" 1>&2
exit 1 exit 1
fi fi
PLUGIN_NAME=$1 PLUGIN_NAME=$1
# Build the plugin
API_KEY=$API_KEY make 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 -" 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" ssh -t $USERNAME -p $VPS_PASSWORD "sudo ln -s /home/$VPS_USERNAME/plugins/$PLUGIN_NAME /home/ozbolt/plugins/$PLUGIN_NAME"

5
build/config.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": [], "globals": [],
"javascript": "$LOCATION$/bundle.js",
"css": ["$LOCATION$/main.css"]
}