goversion

This commit is contained in:
tavo 2024-09-22 10:13:34 -06:00
parent ed80223e2f
commit 27c375144c
2 changed files with 5 additions and 4 deletions

View file

@ -1,4 +1,4 @@
FROM golang:1.19 FROM golang:1.22.7
WORKDIR /conex-builder WORKDIR /conex-builder
COPY . . COPY . .
RUN make RUN make

View file

@ -6,6 +6,7 @@ SRC = ${SRCDIR}/main.go \
${SRCDIR}/auth.go \ ${SRCDIR}/auth.go \
${SRCDIR}/bucket.go \ ${SRCDIR}/bucket.go \
GO = go
GOFILES = ${SRCDIR}/go.sum ${SRCDIR}/go.mod GOFILES = ${SRCDIR}/go.sum ${SRCDIR}/go.mod
GOMODS = github.com/joho/godotenv \ GOMODS = github.com/joho/godotenv \
github.com/lib/pq \ github.com/lib/pq \
@ -18,7 +19,7 @@ GOMODS = github.com/joho/godotenv \
all: ${BIN} fmt all: ${BIN} fmt
${BIN}: ${SRC} ${GOFILES} ${BIN}: ${SRC} ${GOFILES}
(cd ${SRCDIR} && go build -o ../${BIN}) (cd ${SRCDIR} && ${GO} build -o ../${BIN})
fmt: ${SRC} fmt: ${SRC}
@diff=$$(gofmt -d $^); \ @diff=$$(gofmt -d $^); \
@ -28,8 +29,8 @@ fmt: ${SRC}
fi fi
${GOFILES}: ${GOFILES}:
(cd ${SRCDIR} && go mod init ${BIN}) (cd ${SRCDIR} && ${GO} mod init ${BIN})
(cd ${SRCDIR} && go get ${GOMODS}) (cd ${SRCDIR} && ${GO} get ${GOMODS})
start: ${BIN} start: ${BIN}
@./$< & @./$< &