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.
		
		
		
		
			
				
					60 lines
				
				1.2 KiB
			
		
		
			
		
	
	
					60 lines
				
				1.2 KiB
			| 
											2 months ago
										 | GO_IS_STUPID_EXE=
 | ||
|  | 
 | ||
|  | ifeq '$(OS)' 'Windows_NT'
 | ||
|  |   GO_IS_STUPID_EXE=.exe
 | ||
|  | endif
 | ||
|  | 
 | ||
|  | all: tailwind site
 | ||
|  | 	echo "yay!"
 | ||
|  | 
 | ||
|  | build:
 | ||
|  | 	go build .
 | ||
|  | 
 | ||
|  | site:
 | ||
|  | 	go tool ssgod
 | ||
|  | 
 | ||
|  | site_watch:
 | ||
|  | 	go tool ssgod watch
 | ||
|  | 
 | ||
|  | test: site
 | ||
|  | 	go test . -c -o runtests$(GO_IS_STUPID_EXE)
 | ||
|  | 	./runtests$(GO_IS_STUPID_EXE)
 | ||
|  | 
 | ||
|  | test_only:
 | ||
|  | 	go test . -c -o runtests$(GO_IS_STUPID_EXE)
 | ||
|  | 	./runtests$(GO_IS_STUPID_EXE) -test.run TestGamePage
 | ||
|  | 
 | ||
|  | migrate_up:
 | ||
|  | 	go tool goose sqlite3 db.sqlite3 -dir migrations up
 | ||
|  | 
 | ||
|  | migrate_down:
 | ||
|  | 	go tool goose sqlite3 db.sqlite3 -dir migrations down
 | ||
|  | 
 | ||
|  | docs:
 | ||
|  | 	go tool pkgsite --open
 | ||
|  | 
 | ||
|  | tailwind:
 | ||
|  | 	tailwindcss --input ./static/input_style.css --output ./static/style.css
 | ||
|  | 
 | ||
|  | tailwind_watch:
 | ||
|  | 	tailwindcss --input ./static/input_style.css --output ./static/style.css --watch
 | ||
|  | 
 | ||
|  | 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: all
 | ||
|  | 	go tool air -build.stop_on_error "true"
 | ||
|  | 
 | ||
|  | 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
 |