Skip to content

Commit

Permalink
Make sure version is properly set on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pointlessone committed Jan 10, 2018
1 parent c38edbf commit 1dc6f84
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 28 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ RUN adduser -u 9000 -D app

WORKDIR /usr/src/app

COPY engine.json /engine.json
COPY codeclimate-golint.go /usr/src/app/codeclimate-golint.go
COPY engine.json codeclimate-golint.go ./

RUN apk add --no-cache --virtual .dev-deps musl-dev go git && \
RUN apk add --no-cache --virtual .dev-deps musl-dev go git jq && \
export GOPATH=/tmp/go GOBIN=/usr/local/bin && \
go get -d -t -v . && \
export LIBRARY_PATH=/usr/lib32:$LIBRARY_PATH && \
go install codeclimate-golint.go && \
export golint_version=$(cd "${GOPATH}/src/github.com/golang/lint/" && git rev-parse HEAD 2>/dev/null) && \
echo $golint_version && \
cat engine.json | jq '.version = .version + "/" + env.golint_version' > /engine.json && \
apk del .dev-deps && \
rm -rf "$GOPATH"

Expand Down
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,5 @@

IMAGE_NAME ?= codeclimate/codeclimate-golint

update:
docker run \
--rm --interactive \
-v $(PWD)/engine.json:/engine.json \
-v $(PWD)/bin/update:/usr/local/bin/update \
alpine:edge \
/usr/local/bin/update

image: update
image:
docker build --rm -t $(IMAGE_NAME) .
15 changes: 0 additions & 15 deletions bin/update

This file was deleted.

2 changes: 1 addition & 1 deletion engine.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"languages": [
"Go"
],
"version": "1.0.0/6aaf7c34af0f4c36a57e0c429bace4d706d8e931",
"version": "1.0.0",
"spec_version": "0.3.1"
}

0 comments on commit 1dc6f84

Please sign in to comment.