support install cloc on alpine.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
511d8b8700
commit
f4dd294d67
|
@ -3,7 +3,7 @@ FROM golang:1.6.2-alpine
|
||||||
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
|
||||||
|
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
&& apk add git make curl && rm -rf /var/cache/apk/*
|
&& apk add git make curl perl && rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# install glide package management.
|
# install glide package management.
|
||||||
RUN curl https://glide.sh/get | sh
|
RUN curl https://glide.sh/get | sh
|
||||||
|
|
|
@ -84,10 +84,11 @@ generate_cloc_report() {
|
||||||
linux*)
|
linux*)
|
||||||
which cloc || apt-get install cloc ;;
|
which cloc || apt-get install cloc ;;
|
||||||
*)
|
*)
|
||||||
output "unknown: $OSTYPE" 1 ;;
|
curl https://raw.githubusercontent.com/AlDanial/cloc/master/cloc -o /usr/bin/cloc
|
||||||
|
chmod 755 /usr/bin/cloc
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cloc --by-file --xml --out=${cloc_report} --exclude-dir=vendor,Godeps .
|
cloc --by-file --xml --out=${cloc_report} --exclude-dir=vendor,Godeps,.cover .
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
Loading…
Reference in New Issue