From e635761be433375dfd3119d8eaf2dc089e7e7268 Mon Sep 17 00:00:00 2001 From: David Gardiner Date: Wed, 25 Aug 2021 17:35:58 +0000 Subject: [PATCH] Add postcreate command --- .devcontainer/devcontainer.json | 3 ++- run-me.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 run-me.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 54b9692..526b1a9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,5 +2,6 @@ "settings": { "editor.formatOnSave": false, "python.linting.pylintEnabled": "false" - } + }, + "postCreateCommand": "echo `whoami`> whoami.txt && bash ./run-me.sh" } diff --git a/run-me.sh b/run-me.sh new file mode 100755 index 0000000..f4f69a9 --- /dev/null +++ b/run-me.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +echo -n "I was triggered by the postcreate" >> ./postcreated.txt +git add ./postcreated.txt +git commit -m "I am a git commit" \ No newline at end of file