<commit_before>FROM heroku/cedar:14

RUN useradd -d /app -m app
USER app
WORKDIR /app

ENV HOME /app
ENV PORT 3000

ENV GOVERSION 1.4.2
RUN mkdir -p /app/heroku/goroot && mkdir -p /app/src/gopath
RUN curl https://storage.googleapis.com/golang/go${GOVERSION}.linux-amd64.tar.gz \
           | tar xvzf - -C /app/heroku/goroot --strip-components=1

ENV GOROOT /app/heroku/goroot
ENV GOPATH /app/src/gopath
ENV PATH $GOROOT/bin:$GOPATH/bin:$PATH

RUN go get github.com/mitchellh/gox
RUN gox -os="darwin linux windows" -arch="386 amd64" -build-toolchain

RUN mkdir -p /app/heroku/mercurial
RUN curl http://mercurial.selenic.com/release/mercurial-3.4.tar.gz \
          | tar xvzf - -C /app/heroku/mercurial --strip-components=1 \
          && cd /app/heroku/mercurial \
          && make local 
          
ENV PATH /app/heroku/mercurial:$PATH

ONBUILD COPY . /app/src/gopath/src/github.com/root/gox-server
ONBUILD RUN cd /app/src/gopath/src/github.com/root/gox-server && go get ./...

WORKDIR /app/src/gopath/bin
ONBUILD EXPOSE 3000

ONBUILD RUN mkdir -p /app/.profile.d
ONBUILD RUN echo "export GOROOT=\"/app/heroku/goroot\"" > /app/.profile.d/gox-server.sh
ONBUILD RUN echo "export GOPATH=\"/app/src/gopath\"" >> /app/.profile.d/gox-server.sh
ONBUILD RUN echo "export PATH=\"$GOROOT/bin:$GOPATH/bin:/app/heroku/mercurial:\$PATH\"" >> /app/.profile.d/gox-server.sh
ONBUILD RUN echo "cd /app/src/gopath/bin" >> /app/.profile.d/gox-server.sh<commit_msg>Refactoring<commit_after>FROM heroku/cedar:14

RUN useradd -d /app -m app
USER app
WORKDIR /app

ENV HOME /app
ENV PORT 3000

ENV GOVERSION 1.4.2
RUN mkdir -p /app/heroku/goroot && mkdir -p /app/src/gopath
RUN curl https://storage.googleapis.com/golang/go${GOVERSION}.linux-amd64.tar.gz \
           | tar xvzf - -C /app/heroku/goroot --strip-components=1

ENV GOROOT /app/heroku/goroot
ENV GOPATH /app/src/gopath
ENV PATH $GOROOT/bin:$GOPATH/bin:$PATH

RUN go get github.com/mitchellh/gox
RUN gox -os="darwin linux windows" -arch="386 amd64" -build-toolchain

RUN mkdir -p /app/heroku/mercurial
RUN curl http://mercurial.selenic.com/release/mercurial-3.4.tar.gz \
          | tar xvzf - -C /app/heroku/mercurial --strip-components=1 \
          && cd /app/heroku/mercurial \
          && make local 
ENV PATH /app/heroku/mercurial:$PATH

ONBUILD COPY . /app/src/gopath/src/github.com/root/gox-server
ONBUILD RUN cd /app/src/gopath/src/github.com/root/gox-server && go get ./...

WORKDIR /app/src/gopath/bin
ONBUILD EXPOSE 3000

ONBUILD RUN mkdir -p /app/.profile.d
ONBUILD RUN echo "export GOROOT=\"/app/heroku/goroot\"" > /app/.profile.d/gox-server.sh
ONBUILD RUN echo "export GOPATH=\"/app/src/gopath\"" >> /app/.profile.d/gox-server.sh
ONBUILD RUN echo "export PATH=\"$GOROOT/bin:$GOPATH/bin:/app/heroku/mercurial:\$PATH\"" >> /app/.profile.d/gox-server.sh
ONBUILD RUN echo "cd /app/src/gopath/bin" >> /app/.profile.d/gox-server.sh
{'fraction_non_alphanumeric': 0.15816857440166493, 'fraction_numerical': 0.01664932362122789, 'mean_word_length': 3.0392156862745097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4636425', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1139, 'n_words': 237}