From 71ca00f5de31a4bea728e42ba139b3cbffd7453e Mon Sep 17 00:00:00 2001 From: an Date: Wed, 6 Dec 2017 19:31:55 +0100 Subject: [PATCH] Prepare for drone --- Dockerfile | 39 ++++++++++++++++++++++++++++++--------- main.go | 5 +---- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c173cd..c58e55e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,41 @@ -FROM ubuntu:16.04 +FROM golang:latest MAINTAINER Andreas Neue RUN apt-get -y --force-yes update RUN apt-get -y --force-yes upgrade -RUN apt-get install -y ca-certificates +#RUN apt-get install -y ca-certificates RUN apt-get install -y fortune vim -RUN apt-get clean +#RUN apt-get clean -RUN mkdir /mmflokati +RUN mkdir /app +ADD . /app/ +WORKDIR /app +RUN go get -d code.dnix.de/an/flokatilib/... +RUN go get -d code.dnix.de/an/xlog +RUN go get -d ./... +RUN ./genversion.sh +RUN ./genbuilddate.sh +RUN go build -o mmflokati . -COPY mmflokati /mmflokati/mmflokati +CMD ["/app/mmflokati"] + +#FROM ubuntu:16.04 +#MAINTAINER Andreas Neue +# +#RUN apt-get -y --force-yes update +#RUN apt-get -y --force-yes upgrade +#RUN apt-get install -y ca-certificates +#RUN apt-get install -y fortune vim +#RUN apt-get clean +# +#RUN mkdir /mmflokati +# +#COPY mmflokati /mmflokati/mmflokati #COPY newsfeeds.conf /mmflokati/newsfeeds.conf #COPY fortunes /mmflokati/fortunes - -ENV PATH $PATH:/mmflokati - -WORKDIR /mmflokati +# +#ENV PATH $PATH:/mmflokati +# +#WORKDIR /mmflokati #CMD [ "/mmflokati/mmflokati", "-server=irc.dnix.de:6667", "-name=Flokati", "-chan=#test", "-nsname=N", "-nspass=t0ps3cr37" ] diff --git a/main.go b/main.go index b6f5683..8b7cd53 100644 --- a/main.go +++ b/main.go @@ -16,8 +16,6 @@ import ( "code.dnix.de/an/flokatilib/modules" "code.dnix.de/an/xlog" - "mmflokati/version" - "github.com/42wim/matterbridge/matterclient" ) @@ -96,6 +94,5 @@ func main() { } func SoftwareInfo() string { - return fmt.Sprintf("mmflokati %s-%s (built %s [%s])", version.FlokatiVersion, - version.FlokatiBuild, version.FlokatiBuilddate, runtime.Version()) + return fmt.Sprintf("mmflokati %s-%s (built %s [%s])", FlokatiVersion, FlokatiBuild, FlokatiBuilddate, runtime.Version()) }