c2vi dash working

This commit is contained in:
Sebastian Moser
2026-05-06 12:48:20 +02:00
parent 562b1abe9c
commit c9ea571744
23 changed files with 1174 additions and 1991 deletions

21
md
View File

@@ -2,7 +2,7 @@
set -e
MIZE_SRC="/home/me/work/mize" # hardcoded for now
RSYNC_EXCLUDES="--exclude=.git --exclude=node_modules --exclude=target --exclude=mize_config.toml --exclude=rust_dist --exclude=deno_dist --exclude=dist --exclude=result --exclude=pkg"
RSYNC_EXCLUDES="--exclude=node_modules --exclude=target --exclude=mize_config.toml --exclude=rust_dist --exclude=deno_dist --exclude=dist --exclude=result --exclude=pkg"
function main {
if [[ "$1" == "dlu" ]]; then
@@ -23,13 +23,22 @@ function deploy_lush {
echo "c2vi: Deploying to lush..."
# Copy files to lush
rsync -r -u -v --delete --mkpath $RSYNC_EXCLUDES $MIZE_SRC/* lush:here/mize
rsync -r -u -v -a --delete --include=".git/" --include=".git/**" --mkpath $RSYNC_EXCLUDES $MIZE_SRC lush:here
# compile
ssh lush nix develop /home/me/here/mize --impure -v -L -c sh -c "cargo build --release --manifest-path /home/me/here/mize/packages/ppc/Cargo.toml"
# restart service
ssh lush "sudo systemctl restart ppc"
ssh lush << EOF
if ! tmux has-session -t ppc-deploy 2>/dev/null; then
echo "Created new tmux session...."
tmux new-session -d -s ppc-deploy "nix develop git+file:///home/me/here/mize#buildShell"
tmux send-keys -t ppc-deploy "cargo build --featuers desktop --manifest-path /home/me/here/mize/packages/ppc/Cargo.toml" Enter
tmux send-keys -t ppc-deploy "systemctl --user restart ppc" Enter
else
echo "using existing session..."
tmux send-keys -t ppc-deploy "cargo build --features desktop --manifest-path /home/me/here/mize/packages/ppc/Cargo.toml" Enter
tmux send-keys -t ppc-deploy "systemctl --user restart ppc" Enter
fi
EOF
}
function deploy_main_website {