Skip to content

Commit 9ce4542

Browse files
authored
chore(updatecli) when a new Ruby version is available, check for its existence in the ASDF Ruby plugin (#1514)
* chore(updatecli) add a condition for ruby ASDF version --------- Signed-off-by: Damien Duportal <[email protected]>
1 parent 85c4f92 commit 9ce4542

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

updatecli/updatecli.d/ruby.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,23 @@ sources:
2828
\d\.\d\.\d$
2929
3030
conditions:
31+
checkForAsdf:
32+
kind: shell
33+
disablesourceinput: true
34+
dependson:
35+
- "source#rubyDockerImageLatestVersion"
36+
spec:
37+
environments:
38+
- name: PATH
39+
- name: HOME
40+
# Assuming ASDF is installed with the ruby package
41+
command: bash -x -c "asdf plugin-update ruby && asdf list-all ruby | grep '^{{ source "rubyDockerImageLatestVersion" }}$' || { echo 'Ruby version {{ source "rubyDockerImageLatestVersion" }} not available yet on ASDF.' && exit 1; }"
42+
3143
checkForChocolateyPackage:
3244
kind: shell
3345
disablesourceinput: true # Do not pass source as argument to the command line
46+
dependson:
47+
- "source#rubyDockerImageLatestVersion"
3448
spec:
3549
# The final ".1" is added to ruby version by Chocolatey
3650
command: curl --silent --show-error --location --fail --output /dev/null https://community.chocolatey.org/packages/ruby/{{ source "rubyDockerImageLatestVersion" }}.1

0 commit comments

Comments
 (0)