Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit 1bcddd6

Browse files
authored
Merge pull request #243 from gobuffalo/task-updating-version-number
task: tweaking docker build to add the version number
2 parents 365023a + 3cab540 commit 1bcddd6

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

Dockerfile.build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM golang:1.18
22

33
EXPOSE 3000
4-
5-
ENV GOPROXY=https://proxy.golang.org
4+
ARG DOCKER_TAG
65

76
RUN apt-get update \
87
&& apt-get install -y -q build-essential sqlite3 libsqlite3-dev postgresql libpq-dev vim
@@ -32,7 +31,7 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s
3231
# Installing buffalo binary
3332
WORKDIR /cli
3433
ADD . .
35-
RUN go install ./cmd/buffalo
34+
RUN go install -ldflags="-X 'github.com/gobuffalo/cli/internal/runtime.Version=${DOCKER_TAG}'" ./cmd/buffalo
3635

3736
WORKDIR /
3837
RUN go install github.com/gobuffalo/buffalo-pop/v3@latest

Dockerfile.slim.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM golang:1.18-alpine
22

33
EXPOSE 3000
44

5-
ENV GOPROXY=https://proxy.golang.org
5+
ARG DOCKER_TAG
66

77
RUN apk add --no-cache --upgrade apk-tools \
88
&& apk add --no-cache bash curl openssl git build-base nodejs npm sqlite sqlite-dev mysql-client vim postgresql libpq postgresql-contrib libc6-compat
@@ -19,7 +19,7 @@ RUN npm i -g --no-progress yarn \
1919
# Installing buffalo binary
2020
WORKDIR /cli
2121
ADD . .
22-
RUN go install ./cmd/buffalo
22+
RUN go install -ldflags="-X 'github.com/gobuffalo/cli/internal/runtime.Version=${DOCKER_TAG}'" ./cmd/buffalo
2323

2424
WORKDIR /
2525
RUN go install github.com/gobuffalo/buffalo-pop/v3@latest

buffalo

23.1 MB
Binary file not shown.

internal/runtime/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package runtime
22

33
// Version is the current version of the buffalo binary
4-
var Version = "v0.18.7"
4+
var Version = "v0.18.9"

0 commit comments

Comments
 (0)