Skip to content

Commit

Permalink
fix: set version dynamically + bump deps
Browse files Browse the repository at this point in the history
Signed-off-by: Manfred Touron <[email protected]>
  • Loading branch information
moul committed Jun 7, 2020
1 parent 65e9f6d commit c30c813
Show file tree
Hide file tree
Showing 13 changed files with 346 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*#
*~
.#*
.git/
#.git/
Dockerfile
./assh
dist/
Expand Down
1 change: 1 addition & 0 deletions AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY . ./
RUN make install

# minimalist runtime
FROM alpine:3.11
FROM alpine:3.12
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="assh" \
org.label-schema.description="" \
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ PRE_LINT_STEPS += generate
PRE_TIDY_STEPS += generate
PRE_BUMPDEPS_STEPS += generate

VERSION ?= `git describe --tags --always`

This comment has been minimized.

Copy link
@wd

wd Jun 11, 2020

Contributor

As I understand, If we download the source.tar.gz from release page and build from that, the version will be n/a ?

VCS_REF ?= `git rev-parse --short HEAD`

GO_INSTALL_OPTS = -ldflags="-X 'moul.io/assh/v2/pkg/version.Version=$(VERSION)' -X 'moul.io/assh/v2/pkg/version.VcsRef=$(VCS_REF)' "

include rules.mk

.PHONY: generate
Expand Down
66 changes: 66 additions & 0 deletions contrib/completion/bash_autocomplete

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 25 additions & 13 deletions go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c30c813

Please sign in to comment.