From 68250d25d31be0190746b8c77e51cc7d786d1e2c Mon Sep 17 00:00:00 2001 From: Nils Dijk Date: Thu, 5 May 2022 18:11:16 +0200 Subject: [PATCH] dynamically create the .vscode configurations --- .devcontainer/.vscode/c_cpp_properties.json | 16 ++++++++++++++++ {.vscode => .devcontainer/.vscode}/launch.json | 0 .devcontainer/Dockerfile | 6 +++--- .devcontainer/Makefile | 11 +++++++++++ .devcontainer/devcontainer.json | 3 ++- 5 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/.vscode/c_cpp_properties.json rename {.vscode => .devcontainer/.vscode}/launch.json (100%) create mode 100644 .devcontainer/Makefile diff --git a/.devcontainer/.vscode/c_cpp_properties.json b/.devcontainer/.vscode/c_cpp_properties.json new file mode 100644 index 000000000..22596949a --- /dev/null +++ b/.devcontainer/.vscode/c_cpp_properties.json @@ -0,0 +1,16 @@ +{ + "configurations": [ + { + "name": "Citus Development Configuration", + "includePath": [ + "/usr/local/include", + "${workspaceFolder}/**", + "/home/citus/.pgenv/src/postgresql-14.2/src/", + "/home/citus/.pgenv/src/postgresql-14.2/src/include/", + "/home/citus/.pgenv/src/postgresql-14.2/src/interfaces/libpq/", + "${workspaceFolder}/src/include/", + ] + } + ], + "version": 4 +} diff --git a/.vscode/launch.json b/.devcontainer/.vscode/launch.json similarity index 100% rename from .vscode/launch.json rename to .devcontainer/.vscode/launch.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 175c8b3ed..2b5b5958e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -65,7 +65,7 @@ FROM base AS pg12 RUN pgenv build 12.10 RUN rm .pgenv/src/*.tar* # TODO remove excessive artifacts for smaller images -RUN make -C .pgenv/src/postgresql-*/ clean +#RUN #make -C .pgenv/src/postgresql-*/ clean # create a staging directory with all files we want to copy from our pgenv build # we will copy the contents of the staged folder into the final image at once @@ -78,7 +78,7 @@ FROM base AS pg13 RUN pgenv build 13.6 RUN rm .pgenv/src/*.tar* # TODO remove excessive artifacts for smaller images -RUN make -C .pgenv/src/postgresql-*/ clean +#RUN make -C .pgenv/src/postgresql-*/ clean # create a staging directory with all files we want to copy from our pgenv build # we will copy the contents of the staged folder into the final image at once @@ -91,7 +91,7 @@ FROM base AS pg14 RUN pgenv build 14.2 RUN rm .pgenv/src/*.tar* # TODO remove excessive artifacts for smaller images -RUN make -C .pgenv/src/postgresql-*/ clean +#RUN make -C .pgenv/src/postgresql-*/ clean # create a staging directory with all files we want to copy from our pgenv build # we will copy the contents of the staged folder into the final image at once diff --git a/.devcontainer/Makefile b/.devcontainer/Makefile new file mode 100644 index 000000000..b105d9172 --- /dev/null +++ b/.devcontainer/Makefile @@ -0,0 +1,11 @@ + +init: ../.vscode/c_cpp_properties.json ../.vscode/launch.json + +../.vscode: + mkdir ../.vscode + +../.vscode/launch.json: ../.vscode + cp .vscode/launch.json ../.vscode/launch.json + +../.vscode/c_cpp_properties.json: ../.vscode + cp .vscode/c_cpp_properties.json ../.vscode/c_cpp_properties.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 18dd1a3b1..308bda830 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,5 +13,6 @@ "mounts": [ "type=volume,target=/data", ], - "updateContentCommand": "./configure" + "updateContentCommand": "./configure", + "postCreateCommand": "make -C .devcontainer/", }