forked from nixcn/nixcn-cms
- default, run, build actions in justfile Signed-off-by: Asai Neko <sugar@sne.moe>
20 lines
578 B
Makefile
20 lines
578 B
Makefile
project_name := "nixcn-cms"
|
|
server_enrty := "main.go"
|
|
output_dir := join(justfile_directory(), ".outputs")
|
|
client_dir := join(justfile_directory(), "client")
|
|
exec_path := join(output_dir, project_name)
|
|
go_cmd := `realpath $(which go)`
|
|
bun_cmd := `realpath $(which bun)`
|
|
|
|
default: clean build run
|
|
|
|
clean:
|
|
rm -rf {{output_dir}}/*
|
|
|
|
build:
|
|
mkdir -p {{ output_dir }}
|
|
{{ go_cmd }} build -o {{ exec_path }}{{ if os() == "windows" { ".exe" } else { "" } }} {{ server_enrty }}
|
|
|
|
run:
|
|
cd {{ output_dir }} && {{ exec_path }}{{ if os() == "windows" { ".exe" } else { "" } }}
|