chore: docker and make file

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-08-06 13:15:41 -03:00
parent 2add5dfe82
commit 227c3ee3fd
5 changed files with 56 additions and 0 deletions

25
makefile Normal file
View File

@@ -0,0 +1,25 @@
PORT?=8080
lint:
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1 run
build:
go build -o bin/dislate
dev:
go run github.com/joho/godotenv/cmd/godotenv@v1.5.1 \
go run github.com/air-verse/air@v1.52.2 \
--build.cmd "go build -o tmp/bin/dislate" \
--build.bin "tmp/bin/dislate" \
--build.include_ext "go" \
--build.stop_on_error "false" \
--misc.clean_on_exit true \
-- -p $(PORT) -d
run: build
./bin/dislate
clean:
if [[ -d "dist" ]]; then rm -r ./dist; fi
if [[ -d "tmp" ]]; then rm -r ./tmp; fi
if [[ -d "bin" ]]; then rm -r ./bin; fi