aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2023-08-14 23:03:57 +0100
committerMartin Ashby <martin@ashbysoft.com>2023-08-22 10:10:02 +0100
commit89aae265bc3cfd03f4081ef1a8f034e538fef702 (patch)
treea507bf8b33eb10bf3a3143f1f5483b339eb0da9b /deploy.sh
parent6a8a204020449fee3d8ef5e6175932e3731389f0 (diff)
downloadmfashby.net-89aae265bc3cfd03f4081ef1a8f034e538fef702.tar.gz
mfashby.net-89aae265bc3cfd03f4081ef1a8f034e538fef702.tar.bz2
mfashby.net-89aae265bc3cfd03f4081ef1a8f034e538fef702.tar.xz
mfashby.net-89aae265bc3cfd03f4081ef1a8f034e538fef702.zip
align zig and rust implementations of comments
switch deploy script to zig version
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/deploy.sh b/deploy.sh
index 4c32b5b..87fa3ca 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -6,12 +6,20 @@ set -e
hugo
# Build comments app
-pushd comments
+#pushd comments
+#if [ $(uname -m) != "aarch64" ]
+#then
+# RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc"
+#fi
+#cargo build --target=aarch64-unknown-linux-gnu --release
+#popd
+pushd zig-comments
if [ $(uname -m) != "aarch64" ]
then
- RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc"
+ echo "must build on aarch64 for now"
+ exit(1)
fi
-cargo build --target=aarch64-unknown-linux-gnu --release
+zig build -Doptimize=ReleaseSafe
popd
# TODO update caddy with offline message while site being updated
@@ -21,8 +29,10 @@ rsync -rz public/* root@rpi3:/var/www/mfashby.net
# Copy comments app and reboot
ssh root@rpi3 -C systemctl stop comments
-rsync comments/target/aarch64-unknown-linux-gnu/release/comments root@rpi3:/usr/local/bin/comments
-rsync comments/comments.service root@rpi3:/etc/systemd/system/comments.service
+#rsync comments/target/aarch64-unknown-linux-gnu/release/comments root@rpi3:/usr/local/bin/comments
+#rsync comments/comments.service root@rpi3:/etc/systemd/system/comments.service
+rsync zig-comments/zig-out/bin/comments root@rpi3:/usr/local/bin/comments
+rsync zig-comments/comments.service root@rpi3:/etc/systemd/system/comments.service
ssh root@rpi3 -C systemctl daemon-reload
ssh root@rpi3 -C systemctl restart comments