From 4e1ac40fd3e75844689d13fe3e6ca354f7fedc08 Mon Sep 17 00:00:00 2001 From: Carsten Behring Date: Tue, 21 May 2024 20:53:48 +0200 Subject: [PATCH 1/2] use prepare script --- .gitignore | 1 + src/scicloj/.devcontainer/Dockerfile | 3 +++ src/scicloj/.devcontainer/devcontainer.json | 8 ++++---- src/scicloj/.devcontainer/setup.sh | 5 +++++ 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100755 src/scicloj/.devcontainer/setup.sh diff --git a/.gitignore b/.gitignore index 65f73b0..78f6ddf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ src/scicloj/.cpcache/ src/scicloj/.clj-kondo src/scicloj/poetry.lock +/src/scicloj/.lsp/ diff --git a/src/scicloj/.devcontainer/Dockerfile b/src/scicloj/.devcontainer/Dockerfile index f3d8ef9..9592d8a 100644 --- a/src/scicloj/.devcontainer/Dockerfile +++ b/src/scicloj/.devcontainer/Dockerfile @@ -20,3 +20,6 @@ RUN groupadd --gid $USER_GID $USERNAME \ # [Optional] Set the default user. Omit if you want to keep the default as root. USER $USERNAME +SHELL ["/bin/bash", "-ec"] +ENTRYPOINT ["bash"] + diff --git a/src/scicloj/.devcontainer/devcontainer.json b/src/scicloj/.devcontainer/devcontainer.json index 5111897..74ebeb6 100644 --- a/src/scicloj/.devcontainer/devcontainer.json +++ b/src/scicloj/.devcontainer/devcontainer.json @@ -42,10 +42,10 @@ } }, - "postStartCommand": - { "ide-setup": "bash -c 'if [ -f \"/home/vscode/.setup-ide/setup-ide.sh\" ]; then /home/vscode/.setup-ide/setup-ide.sh; fi'", - "clojure prepare": "bash -i -c 'clj -Sthreads 1 -P'", - "poetry setup": "bash -i -c 'mkdir -p .venv && poetry install'" + "postCreateCommand": + { "ide-setup": ["bash", "-c", "if [ -f \"/home/vscode/.setup-ide/setup-ide.sh\" ]; then /home/vscode/.setup-ide/setup-ide.sh; fi"], + "prepare": ["bash","-c", "-i", "./.devcontainer/setup.sh"] + } } diff --git a/src/scicloj/.devcontainer/setup.sh b/src/scicloj/.devcontainer/setup.sh new file mode 100755 index 0000000..5d7f674 --- /dev/null +++ b/src/scicloj/.devcontainer/setup.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +clj -Sthreads 1 -P +mkdir -p .venv +poetry install \ No newline at end of file From 89e26df7a2d02c8f4c180679aa238b0f2667a046 Mon Sep 17 00:00:00 2001 From: Carsten Behring Date: Tue, 21 May 2024 19:16:58 +0000 Subject: [PATCH 2/2] 1.0.4 --- src/scicloj/CHANGELOG.md | 2 ++ src/scicloj/devcontainer-template.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scicloj/CHANGELOG.md b/src/scicloj/CHANGELOG.md index 167119c..d6206a8 100644 --- a/src/scicloj/CHANGELOG.md +++ b/src/scicloj/CHANGELOG.md @@ -1,4 +1,6 @@ # unreleased +# 1.0.4 +- use setup.sh script # 1.0.3 - added clojure -P to startup diff --git a/src/scicloj/devcontainer-template.json b/src/scicloj/devcontainer-template.json index f037c98..ec9f9a2 100644 --- a/src/scicloj/devcontainer-template.json +++ b/src/scicloj/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "scicloj", - "version": "1.0.3", + "version": "1.0.4", "name": "scicloj template", "description": "A scicloj Template", "documentationURL": "https://github.com/scicloj/devcontainer-templates/tree/main/src/scicloj",