From e7f2ff748df8ed153bf167e28e46a572a3cbab7a Mon Sep 17 00:00:00 2001 From: "Rodrigo E. Merino" Date: Sun, 28 Nov 2021 20:04:46 -0300 Subject: [PATCH 1/6] Heroku deployment config --- bin/compile | 29 +++++++++++++++++++++++++++++ bin/detect | 7 +++++++ bin/release | 5 +++++ 3 files changed, 41 insertions(+) create mode 100644 bin/compile create mode 100644 bin/detect create mode 100644 bin/release diff --git a/bin/compile b/bin/compile new file mode 100644 index 0000000..d6450ca --- /dev/null +++ b/bin/compile @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# bin/compile + +# used for inline heroku buildpack + +BUILD_DIR=${1:-} +CACHE_DIR=${2:-} +ENV_DIR=${3:-} + +PROJECT_PATH=controller/src/main/python + +echo "-----> My Subdir buildpack: path is $PROJECT_PATH" +echo " creating cache: $CACHE_DIR" +mkdir -p $CACHE_DIR +TMP_DIR=`mktemp -d $CACHE_DIR/subdirXXXXX` +echo " created tmp dir: $TMP_DIR" + +echo " moving working dir: $PROJECT_PATH to $TMP_DIR" +cp -R $BUILD_DIR/$PROJECT_PATH/. $TMP_DIR/ + +echo " cleaning build dir $BUILD_DIR" +rm -rf $BUILD_DIR +echo " recreating $BUILD_DIR" +mkdir -p $BUILD_DIR +echo " copying work dir from cache $TMP_DIR to build dir $BUILD_DIR" +cp -R $TMP_DIR/. $BUILD_DIR/ +echo " cleaning tmp dir $TMP_DIR" +rm -rf $TMP_DIR +exit 0 diff --git a/bin/detect b/bin/detect new file mode 100644 index 0000000..2987d54 --- /dev/null +++ b/bin/detect @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# bin/detect + +# used for inline heroku buildpack + +echo "My Subdir buildpack" +exit 0 diff --git a/bin/release b/bin/release new file mode 100644 index 0000000..47640ef --- /dev/null +++ b/bin/release @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# used for inline heroku buildpack + +echo "--- {}" From a9c146d5454c98868194156d1927adec9fa1dbcc Mon Sep 17 00:00:00 2001 From: "Rodrigo E. Merino" Date: Sun, 28 Nov 2021 20:07:07 -0300 Subject: [PATCH 2/6] Heroku deployment config: execute permissions --- bin/compile | 0 bin/detect | 0 bin/release | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bin/compile mode change 100644 => 100755 bin/detect mode change 100644 => 100755 bin/release diff --git a/bin/compile b/bin/compile old mode 100644 new mode 100755 diff --git a/bin/detect b/bin/detect old mode 100644 new mode 100755 diff --git a/bin/release b/bin/release old mode 100644 new mode 100755 From 4e307a212e21f2fba97bf4ab53a7a34f5638a1f3 Mon Sep 17 00:00:00 2001 From: "Rodrigo E. Merino" Date: Sun, 28 Nov 2021 20:13:26 -0300 Subject: [PATCH 3/6] Point ws clients to heroku app --- controller/src/main/www/camera_joystick.html | 2 +- projection/src/main/python/eye.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/src/main/www/camera_joystick.html b/controller/src/main/www/camera_joystick.html index 20515c4..f01ff10 100644 --- a/controller/src/main/www/camera_joystick.html +++ b/controller/src/main/www/camera_joystick.html @@ -19,7 +19,7 @@