Skip to content

Commit

Permalink
Explore more robust post create command (#33)
Browse files Browse the repository at this point in the history
* Move postCreateCommand into separate file, source .zshrc after update
* Remove openFiles (welcome.txt)
* Update trufflehog version to latest
  • Loading branch information
larskaare authored Oct 29, 2024
1 parent 6381371 commit 931184a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,13 @@
"terminal.integrated.defaultProfile.linux": "zsh",
"csharp.suppressBuildAssetsNotification": true
}
},
"codespaces": {
"openFiles": [
".devcontainer/welcome.txt"
]
}
},
"updateContentCommand": {
"trufflehog": "curl -L https://github.com/trufflesecurity/trufflehog/releases/download/v3.63.3/trufflehog_3.63.3_linux_amd64.tar.gz| tar -xz -C /tmp/ && sudo mv /tmp/trufflehog /usr/local/bin/"
"trufflehog": "curl -L https://github.com/trufflesecurity/trufflehog/releases/download/v3.82.13/trufflehog_3.82.13_linux_amd64.tar.gz| tar -xz -C /tmp/ && sudo mv /tmp/trufflehog /usr/local/bin/"
},
"postCreateCommand": {
"sed": "sed -i 's/ZSH_THEME=\\\"devcontainers\\\"/ZSH_THEME=\\\"avit\\\"/g' ~/.zshrc",
"addPath": "echo 'export PATH=$PATH:$CODESPACE_VSCODE_FOLDER/src' >> ~/.zshrc",
"cloc": "sudo apt update && sudo apt install -y cloc"
"define-environment": "./src/define-environment.sh; source ~/.zshrc"
},
"containerEnv": {
"PIPELINE": "development",
Expand Down
5 changes: 5 additions & 0 deletions src/define-environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

echo 'export PATH=$CODESPACE_VSCODE_FOLDER/src:$PATH' >> ~/.zshrc
sed -i 's/ZSH_THEME="devcontainers"/ZSH_THEME="avit"/' ~/.zshrc
sudo apt update -qq && sudo apt install -y -qq cloc

0 comments on commit 931184a

Please sign in to comment.