From 7dacbbd2e807447593bcde77efc50dc70c6a9670 Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Mon, 9 May 2022 14:33:17 +0200 Subject: [PATCH] install ancient (correct) version of uncrustify --- .devcontainer/Dockerfile | 20 ++++++++++++++++++-- .devcontainer/devcontainer.json | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c95f14970..4c4c5852a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -35,8 +35,6 @@ RUN apt update && apt install -y \ python3 \ python3-pip \ sudo \ - # TODO install specific version of uncrustify - uncrustify \ uuid-dev \ vim \ zlib1g-dev \ @@ -100,6 +98,22 @@ RUN mkdir .pgenv-staging/ RUN cp -r .pgenv/src .pgenv/pgsql-* .pgenv/config .pgenv-staging/ RUN rm .pgenv-staging/config/default.conf +FROM base AS uncrustify-builder + +RUN sudo apt update && sudo apt install -y cmake tree + +WORKDIR /uncrustify +RUN curl -L https://github.com/uncrustify/uncrustify/archive/uncrustify-0.68.1.tar.gz | tar xz +WORKDIR /uncrustify/uncrustify-uncrustify-0.68.1/ +RUN mkdir build +WORKDIR /uncrustify/uncrustify-uncrustify-0.68.1/build/ +RUN cmake .. +RUN make -sj8 + +RUN make install DESTDIR=/uncrustify +RUN echo "cachebuster" +RUN tree /uncrustify/usr + # assemble the final container by copying over the artifacts from separately build containers FROM base AS devcontainer @@ -107,6 +121,8 @@ COPY --from=pg12 /home/citus/.pgenv-staging/ /home/citus/.pgenv/ COPY --from=pg13 /home/citus/.pgenv-staging/ /home/citus/.pgenv/ COPY --from=pg14 /home/citus/.pgenv-staging/ /home/citus/.pgenv/ +COPY --from=uncrustify-builder /uncrustify/usr/ /usr/ + # add some common tools to the final container # bin directory for user tools RUN mkdir .bin diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 308bda830..ffc896387 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "citus/devcontainer:dev-20220505", + "image": "citus/devcontainer:dev-20220509", "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt",