Skip to content

Commit

Permalink
Dependancies asdf for make all fully automated (#12)
Browse files Browse the repository at this point in the history
* asdf for zsh into post create command

* change to ws folder

* as scripts

* zsh in post create

* try bash interactive

* trying without interactive

* running with zsh

* port forwards and make working

* source before make
  • Loading branch information
RossBugginsNHS authored May 29, 2024
1 parent 5307a65 commit 2a6f921
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created.
"postCreateCommand": "jekyll --version && cd docs && bundle install",
"postCreateCommand": "zsh scripts/devcontainer/postcreatecommand.sh",
"postStartCommand": "zsh scripts/devcontainer/poststartcommand.sh",
"forwardPorts": [4000],
// Configure tool-specific properties.
"customizations": {
"codespaces": {
Expand Down
17 changes: 17 additions & 0 deletions scripts/devcontainer/postcreatecommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

rm -Rf ~/.asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf;
chmod +x ~/.asdf/asdf.sh;
echo '. $HOME/.asdf/asdf.sh' >> ~/.zshrc
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc

source ~/.zshrc

echo 'asdf setup complete'

make config

jekyll --version && cd docs && bundle install

echo 'jekyll setup complete'
3 changes: 3 additions & 0 deletions scripts/devcontainer/poststartcommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
source ~/.zshrc
make config

0 comments on commit 2a6f921

Please sign in to comment.