Files
gosqldump/justfile

21 lines
580 B
Makefile
Raw Permalink Normal View History

2024-08-30 11:25:28 +12:00
#!/usr/bin/env just --justfile
go-mod := `go list`
flags := '-ldflags="-s -w"'
install:
go install {{flags}}
build:
@echo -n "Building app ... "
@go build {{flags}} -o bin/gosqldump ./main.go && echo "OK" || echo "FAILED"
build-win:
@echo -n "Building app for windows ... "
@GOOS=windows GOARCH=amd64 go build {{flags}} -o bin/gosqldump.exe ./main.go && echo "OK" || echo "FAILED"
2024-08-30 11:25:28 +12:00
update:
go get -u
go mod tidy -v
rename new-go-mod:
@find . -type f -not -path './.git/*' -exec sed -i '' -e "s|{{go-mod}}|{{new-go-mod}}|g" >/dev/null 2>&1 {} \;