You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.2 KiB
57 lines
1.2 KiB
all: build
|
|
ifeq '$(OS)' 'Windows_NT'
|
|
powershell -ExecutionPolicy bypass "./tools/restart.ps1"
|
|
else
|
|
curl http://127.0.0.1:9999/webapp || true
|
|
endif
|
|
|
|
build:
|
|
go build .
|
|
|
|
site:
|
|
go tool ssgod
|
|
|
|
test: site
|
|
go test MY/webapp/tests -c
|
|
./tests.test
|
|
|
|
test_only:
|
|
go test . -c -o
|
|
./tests.test -test.run TestSomePage
|
|
|
|
migrate_up:
|
|
goose sqlite3 db.sqlite3 -dir migrations up
|
|
|
|
migrate_down:
|
|
goose sqlite3 db.sqlite3 -dir migrations down
|
|
|
|
docs:
|
|
pkgsite --open
|
|
|
|
fix_ubuntu_ulimit:
|
|
ulimit -n 65536
|
|
|
|
tailwind:
|
|
tailwindcss --input ./static/input_style.css --output ./static/style.css
|
|
|
|
tailwind_watch:
|
|
tailwindcss --input ./static/input_style.css --output ./static/style.css --watch=always
|
|
|
|
tailwind_install:
|
|
curl -LO https://github.com/tailwindlabs/tailwindcss/releases/download/v4.1.12/tailwindcss-linux-x64
|
|
chmod oug+x tailwindcss-linux-x64
|
|
sudo mv tailwindcss-linux-x64 /usr/local/bin/tailwindcss
|
|
|
|
dev:
|
|
go tool ozai
|
|
|
|
coverage:
|
|
go build -cover -o webapp
|
|
mkdir -p .coverage
|
|
echo "GOCOVERDIR=.coverage ./webapp"
|
|
|
|
cover_report:
|
|
go tool covdata textfmt -i=.coverage -o coverage.txt
|
|
go tool cover -func=coverage.txt
|
|
go tool cover -html=coverage.txt -o coverage.html
|
|
open coverage.html
|
|
|