mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
change gitiles bazel version
Signed-off-by: Jess Frazelle <acidburn@jessfraz.com>
This commit is contained in:
parent
a0d787d7ad
commit
aaef88247f
|
@ -5,13 +5,13 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
bash \
|
bash \
|
||||||
ca-certificates \
|
ca-certificates
|
||||||
openjdk8
|
|
||||||
|
|
||||||
# https://github.com/bazelbuild/bazel/releases
|
# https://github.com/bazelbuild/bazel/releases
|
||||||
ENV BAZEL_VERSION 0.12.0
|
ENV BAZEL_VERSION 0.28.1
|
||||||
# https://gerrit.googlesource.com/gitiles/
|
# https://gerrit.googlesource.com/gitiles/
|
||||||
ENV GITILES_VERSION v0.2-1
|
ENV GITILES_VERSION v0.3-1
|
||||||
|
ENV JAVA_HOME /usr/lib/jvm/default-jvm
|
||||||
|
|
||||||
# install bazel
|
# install bazel
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
|
@ -20,8 +20,10 @@ RUN set -x \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
linux-headers \
|
linux-headers \
|
||||||
python \
|
openjdk11 \
|
||||||
|
python3 \
|
||||||
zip \
|
zip \
|
||||||
|
&& ln -snf $(which python3) /usr/bin/python \
|
||||||
&& : install Bazel to build gitiles \
|
&& : 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 \
|
&& 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}" \
|
&& mkdir "/tmp/bazel-${BAZEL_VERSION}" \
|
||||||
|
@ -29,17 +31,14 @@ RUN set -x \
|
||||||
&& rm -rf /tmp/bazel.zip \
|
&& rm -rf /tmp/bazel.zip \
|
||||||
&& ( \
|
&& ( \
|
||||||
cd "/tmp/bazel-${BAZEL_VERSION}" \
|
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 \
|
&& bash compile.sh \
|
||||||
&& cp -p output/bazel /usr/bin/ \
|
&& cp -p output/bazel /usr/bin/ \
|
||||||
) \
|
)
|
||||||
&& git clone --depth 1 --branch "${GITILES_VERSION}" https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
|
|
||||||
|
RUN git clone --depth 1 --branch "${GITILES_VERSION}" https://gerrit.googlesource.com/gitiles /usr/src/gitiles \
|
||||||
&& ( \
|
&& ( \
|
||||||
cd /usr/src/gitiles \
|
cd /usr/src/gitiles \
|
||||||
&& bazel build --incompatible_disallow_uncalled_set_constructor=false gitiles-dev:dev \
|
&& bazel build --incompatible_depset_is_not_iterable=false --sandbox_debug //:gitiles \
|
||||||
&& cp -rL bazel-bin bin \
|
&& cp -rL bazel-bin bin \
|
||||||
&& rm -rf bazel-bin \
|
&& rm -rf bazel-bin \
|
||||||
) \
|
) \
|
||||||
|
|
|
@ -28,4 +28,4 @@ fi
|
||||||
PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT"
|
PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT"
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
exec "${ROOT}/bin/gitiles-dev/dev" $PROPERTIES
|
exec "${ROOT}/bin/java/com/google/gitiles/dev/dev" $PROPERTIES
|
||||||
|
|
Loading…
Reference in New Issue
Block a user