From 5eb39c52a0ca7157f264a40d412a0c8f2fa3c876 Mon Sep 17 00:00:00 2001 From: Stefan Stammberger Date: Sun, 5 Dec 2021 21:14:25 +0100 Subject: [PATCH] feat: add sync to blitz make target --- Makefile | 6 +++++- scripts/sync_to_blitz.sh | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 scripts/sync_to_blitz.sh diff --git a/Makefile b/Makefile index 2bd66ed..74412b2 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ help: @echo "To test the project type 'make test'" @echo "To assess test coverage type 'make coverage'" @echo "To generate the requirements.txt file for pip type 'make requirements'" + @echo "To sync current changes to a blitz for testing, type 'make sync_to_blitz'. Adjust connection values in scripts/push_to_blitz.sh" @echo "------------------------------------" clean: @@ -32,4 +33,7 @@ coverage: python -m coverage html requirements: - poetry export > requirements.txt \ No newline at end of file + poetry export > requirements.txt + +sync_to_blitz: + bash scripts/sync_to_blitz.sh \ No newline at end of file diff --git a/scripts/sync_to_blitz.sh b/scripts/sync_to_blitz.sh new file mode 100644 index 0000000..533a8c5 --- /dev/null +++ b/scripts/sync_to_blitz.sh @@ -0,0 +1,11 @@ +# Set the IP of the Raspiblitz +ip=192.168.1.254 + +# admin password, WARNING only use with a dev machine +password="your_pw_here" + +local=. +remote=admin@$ip:/home/admin/blitz_api + +# Needs sshpass installed +sshpass -p "$password" rsync -re ssh --progress $local $remote \ No newline at end of file