Compare commits

..

3 Commits

Author SHA1 Message Date
69d2eb70a1 gitignore the output binaries 2024-03-06 12:58:34 +05:30
7910cec1e0 update module refs to work in outside GOPATH 2024-03-06 12:55:23 +05:30
664f82d4cf update Makefile to work with toolbox
- don't use podman prefix if `go` command is found
2024-03-06 12:51:13 +05:30
3 changed files with 10 additions and 4 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/out/

View File

@@ -1,16 +1,21 @@
GO_MODULE = qc MOD_NAME = qc
GO_MODULE_FULL = gitea.kevinnlsamuel.com/kevinnls/$(GO_MODULE) GO_MODULE = gitea.kevinnlsamuel.com/kevinnls/$(MOD_NAME)
OUTDIR = out/
ifeq "$(shell command -v go)" ""
prefix = podman run --interactive --tty --rm \ prefix = podman run --interactive --tty --rm \
--workdir /usr/local/go/src/$(GO_MODULE) \ --workdir /usr/local/go/src/$(GO_MODULE) \
--volume $(PWD)/:/usr/local/go/src/$(GO_MODULE)/:Z \ --volume $(PWD)/:/usr/local/go/src/$(GO_MODULE)/:Z \
golang:alpine golang:alpine
else
prefix =
endif
run: run:
$(prefix) go run $(GO_MODULE) $(ARGS) $(prefix) go run $(GO_MODULE) $(ARGS)
test: test:
$(prefix) go test ./... $(ARGS) $(prefix) go test ./... $(ARGS)
build: build:
$(prefix) go build -v $(GO_MODULE) $(ARGS) $(prefix) go build -o $(OUTDIR)/ -v $(GO_MODULE) $(ARGS)
sh: sh:
$(prefix) sh $(prefix) sh

View File

@@ -3,7 +3,7 @@ package main
import ( import (
"fmt" "fmt"
"os" "os"
"qc/internal/argparser" "gitea.kevinnlsamuel.com/kevinnls/qc/internal/argparser"
) )
func main() { func main() {