justfile 582 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env just --justfile
  2. jfdir := replace(justfile_directory(), "\\", "/")
  3. dist := jfdir / "dist"
  4. goos := `go env GOOS`
  5. example_html := jfdir / "misc" / "index.html"
  6. example_html_dist_dir := dist / "wwwroot"
  7. example_html_dist := example_html_dist_dir / "index.html"
  8. executable_suffix := if goos == "windows" { ".exe" } else { "" }
  9. export GOOS := goos
  10. default:
  11. just --list
  12. tidy:
  13. go mod tidy -e
  14. build:
  15. go build -o {{dist / "SimpleHttpTestServerV2" + executable_suffix}}
  16. cp_html:
  17. -mkdir -p {{ example_html_dist_dir }}
  18. cp {{ example_html }} {{ example_html_dist }}