1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
.PHONY: local compile html upload default
default: local
SRC_FILES := $(shell find src -type f)
compile:
nim c -d:danger make
ifeq ($(shell uname),Darwin)
strip -ur make && du --si -A make
else
strip make && du -sh make
endif
html: $(SRC_FILES)
rm -rf public
cp -R src public
./make
htmldev: $(SRC_FILES)
rm -rf public
cp -R src public
./make --dev
local: html
bun run dev
download:
rsync -rtvzP "root@auto-editor.com:/var/www/auto-editor/public/img" src
upload: html
rsync -rtvzP --delete ./public "root@auto-editor.com:/var/www/auto-editor"
rsync server.js "root@auto-editor.com:/var/www/auto-editor/server.js"
rsync package.json "root@auto-editor.com:/var/www/auto-editor/package.json"
ssh root@auto-editor.com "systemctl restart ae; echo 'done'"
|