From 00344947ff9a95622b531eed0dd1c08514c0f3cc Mon Sep 17 00:00:00 2001 From: Will Fleming Date: Tue, 17 Oct 2017 12:38:30 -0400 Subject: [PATCH] Mechanism for forcing a golint update They don't version releases, so it's always a matter of installing whatever's latest. Similar to some other projects, I've added a file we can touch to force expire docker layer caches & get a new version. --- DATE_BUILT | 1 + Dockerfile | 1 + README.md | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 DATE_BUILT diff --git a/DATE_BUILT b/DATE_BUILT new file mode 100644 index 0000000..075a449 --- /dev/null +++ b/DATE_BUILT @@ -0,0 +1 @@ +Tue Oct 17 12:36:42 EDT 2017 diff --git a/Dockerfile b/Dockerfile index 718d53a..5ee9fb2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ MAINTAINER Code Climate WORKDIR /usr/src/app COPY codeclimate-golint.go /usr/src/app/codeclimate-golint.go +COPY DATE_BUILT /usr/src/app/DATE_BUILT RUN apk --update add go git && \ export GOPATH=/tmp/go GOBIN=/usr/local/bin && \ diff --git a/README.md b/README.md index 0fed43f..88f06cb 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,12 @@ engines: docker build -t codeclimate/codeclimate-golint . ``` +### Updating + +`golint` doesn't version releases, so in order to get the latest version & force +a new docker image build, we have a `DATE_BUILT` file: to force an update of +golint, run `date > DATE_BUILT` locally & then rebuild the docker image. + ### Need help? For help with Golint, [check out their documentation](https://github.com/golang/lint).