Skip to content

Commit

Permalink
👷 WIP: Use asdf on CI
Browse files Browse the repository at this point in the history
Why:
- Use the same mechanism for managing versions on CI as locally.
  • Loading branch information
luontola committed Oct 4, 2024
1 parent dc95238 commit f158e58
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ blocks:
- sem-version java 17
- nvm install 21
- sudo apt-get install -y zopfli brotli
- which java
- java --version
- which node
- node --version
- ./scripts/install-asdf.sh
- which java
- java --version
- which node
- node --version
- asdf current

- ./scripts/build.sh

Expand Down
13 changes: 13 additions & 0 deletions scripts/install-asdf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euxo pipefail

if [ -d ~/.asdf ]; then
exit 0
fi

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
#echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
. "$HOME/.asdf/asdf.sh"
asdf plugin add java
asdf plugin add nodejs
asdf install

0 comments on commit f158e58

Please sign in to comment.