diff --git a/.gitignore b/.gitignore index 1032454e0..4a965801c 100644 --- a/.gitignore +++ b/.gitignore @@ -229,4 +229,6 @@ yarn-error.log* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json -!.vscode/extensions.json \ No newline at end of file +!.vscode/extensions.json + +/backend/* diff --git a/Makefile b/Makefile index f552fb00e..ea576b51e 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,7 @@ publish: build travis: build test +.PHONY: backend +backend: + bin/run_backend.sh + diff --git a/backend b/backend new file mode 160000 index 000000000..3cd7f04d2 --- /dev/null +++ b/backend @@ -0,0 +1 @@ +Subproject commit 3cd7f04d26fed22f518db421e8b357c56a881b2c diff --git a/bin/run_backend.sh b/bin/run_backend.sh new file mode 100755 index 000000000..a8aa0af2d --- /dev/null +++ b/bin/run_backend.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set +exu + +function get_base_path(){ + cd $(dirname $0) && cd .. && pwd +} + +BASE_DIR="$(get_base_path)" +BACKEND_DIR="${BASE_DIR}/backend" +BACKEND_REPO='https://github.com/OperationCode/operationcode_backend.git' + +echo "Cloning backend repo into $BACKEND_DIR" +git clone $BACKEND_REPO $BACKEND_DIR + +echo "Starting backend" +cd $BACKEND_DIR && make build && make db_create && make db_migrate && make run