From 151ad102dd780b040242acbfaf09e0ea9ea2a332 Mon Sep 17 00:00:00 2001 From: lqdev Date: Sun, 27 Aug 2023 22:33:54 +0200 Subject: [PATCH] split up client scripts --- admin/client_edit.fish | 14 +------------- admin/client_push.fish | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 admin/client_push.fish diff --git a/admin/client_edit.fish b/admin/client_edit.fish index e1547c4..cea5e8d 100644 --- a/admin/client_edit.fish +++ b/admin/client_edit.fish @@ -6,16 +6,4 @@ 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 +fish admin/client_push.fish diff --git a/admin/client_push.fish b/admin/client_push.fish new file mode 100644 index 0000000..28e69e8 --- /dev/null +++ b/admin/client_push.fish @@ -0,0 +1,19 @@ +#!/usr/bin/env fish + +cd $TREEHOUSE_PATH + +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 static template \ + treehouse.toml +git commit +git push + +echo +set_color white --bold; echo "* Uploading to server"; set_color normal +fish admin/client_sync.fish