Skip to content

Commit

Permalink
Revert "change gitiles bazel version"
Browse files Browse the repository at this point in the history
This reverts commit aaef882.
  • Loading branch information
jessfraz committed Jul 26, 2019
1 parent aaef882 commit d9ffbdd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions gitiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk

RUN apk add --no-cache \
bash \
ca-certificates
ca-certificates \
openjdk8

# https://github.com/bazelbuild/bazel/releases
ENV BAZEL_VERSION 0.28.1
ENV BAZEL_VERSION 0.12.0
# https://gerrit.googlesource.com/gitiles/
ENV GITILES_VERSION v0.3-1
ENV JAVA_HOME /usr/lib/jvm/default-jvm
ENV GITILES_VERSION v0.2-1

# install bazel
RUN set -x \
Expand All @@ -20,25 +20,26 @@ RUN set -x \
curl \
git \
linux-headers \
openjdk11 \
python3 \
python \
zip \
&& ln -snf $(which python3) /usr/bin/python \
&& : install Bazel to build gitiles \
&& curl -sSL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip" -o /tmp/bazel.zip \
&& mkdir "/tmp/bazel-${BAZEL_VERSION}" \
&& unzip -qd "/tmp/bazel-${BAZEL_VERSION}" /tmp/bazel.zip \
&& rm -rf /tmp/bazel.zip \
&& ( \
cd "/tmp/bazel-${BAZEL_VERSION}" \
&& : add -fpermissive compiler option to avoid compilation failure \
&& sed -i -e '/"-std=c++0x"/{h;s//"-fpermissive"/;x;G}' tools/cpp/cc_configure.bzl \
&& : add '#include <sys/stat.h>' to avoid mode_t type error \
&& sed -i -e '/#endif \/\/ COMPILER_MSVC/{h;s//#else/;G;s//#include <sys\/stat.h>/;G;}' third_party/ijar/common.h \
&& bash compile.sh \
&& cp -p output/bazel /usr/bin/ \
)

RUN git clone --depth 1 --branch "${GITILES_VERSION}" https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
) \
&& git clone --depth 1 --branch "${GITILES_VERSION}" https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
&& ( \
cd /usr/src/gitiles \
&& bazel build --incompatible_depset_is_not_iterable=false --sandbox_debug //:gitiles \
&& bazel build --incompatible_disallow_uncalled_set_constructor=false gitiles-dev:dev \
&& cp -rL bazel-bin bin \
&& rm -rf bazel-bin \
) \
Expand Down
2 changes: 1 addition & 1 deletion gitiles/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ fi
PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT"

# shellcheck disable=SC2086
exec "${ROOT}/bin/java/com/google/gitiles/dev/dev" $PROPERTIES
exec "${ROOT}/bin/gitiles-dev/dev" $PROPERTIES

0 comments on commit d9ffbdd

Please sign in to comment.