From 8e81294cbdbf4292b71527bb90cc6a8304183caf Mon Sep 17 00:00:00 2001 From: lqdev Date: Sun, 27 Aug 2023 22:22:28 +0200 Subject: [PATCH] client-side management scripts --- admin/client_edit.fish | 21 +++++++++++++++++++++ admin/client_sync.fish | 3 +++ 2 files changed, 24 insertions(+) create mode 100644 admin/client_edit.fish create mode 100644 admin/client_sync.fish diff --git a/admin/client_edit.fish b/admin/client_edit.fish new file mode 100644 index 0000000..e1547c4 --- /dev/null +++ b/admin/client_edit.fish @@ -0,0 +1,21 @@ +#!/usr/bin/env fish + +cd $TREEHOUSE_PATH + +echo +set_color white --bold; echo "* Running editor"; set_color normal +eval $EDITOR content/index.tree + +echo +set_color white --bold; echo "* Fixing the tree"; set_color normal +cargo run -p treehouse fix-all --apply + +echo +set_color white --bold; echo "* Committing changes"; set_color normal +git add content +git commit +git push + +echo +set_color white --bold; echo "* Uploading to server"; set_color normal +fish admin/client_sync.fish diff --git a/admin/client_sync.fish b/admin/client_sync.fish new file mode 100644 index 0000000..d33af1a --- /dev/null +++ b/admin/client_sync.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +ssh $TREEHOUSE_SERVER -p $TREEHOUSE_SERVER_PORT 'fish' '$TREEHOUSE_PATH/admin/server_sync.fish'