From 830c6d9f6ddec3ddeba68bc973a6e5ed19a44e0c Mon Sep 17 00:00:00 2001 From: zeus Date: Sun, 6 Dec 2020 16:03:13 +0200 Subject: [PATCH] hot reload --- hot_reload.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 hot_reload.sh diff --git a/hot_reload.sh b/hot_reload.sh new file mode 100755 index 0000000..1cd777f --- /dev/null +++ b/hot_reload.sh @@ -0,0 +1,20 @@ +#!/bin/bash + + +#export SWARMLAB_token=2a6594ae1ad9d978a35087af21b9eeef6ed0912e +#export SWARMLAB_name=ondemand_playgroundnodejs_masterNqGMumYI + +if [ ! -z $SWARMLAB_token ] && [ ! -z $SWARMLAB_name ]; then + +filetmp1=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10 ; echo '') +curl -k -X POST https://api.swarmlab.io/swarmlabrunhotreload \ + -H "Authorization: Bearer $SWARMLAB_token" \ + -H "Accept: application/json" \ + -H "Content-Type: application/json" \ + --data "{\"swarmlabname\":\"$SWARMLAB_name\"}" > /tmp/$filetmp-res.json + +jq '.' /tmp/$filetmp-res.json +else + echo "export SWARMLAB_token=token SWARMLAB_name=swarmlabname" + +fi