Skip to content

Commit

Permalink
chore(updatecli) when a new Ruby version is available, check for its …
Browse files Browse the repository at this point in the history
…existence in the ASDF Ruby plugin (#1514)

* chore(updatecli) add a condition for ruby ASDF version

---------

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
  • Loading branch information
dduportal authored Nov 12, 2024
1 parent 85c4f92 commit 9ce4542
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions updatecli/updatecli.d/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,23 @@ sources:
\d\.\d\.\d$
conditions:
checkForAsdf:
kind: shell
disablesourceinput: true
dependson:
- "source#rubyDockerImageLatestVersion"
spec:
environments:
- name: PATH
- name: HOME
# Assuming ASDF is installed with the ruby package
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; }"

checkForChocolateyPackage:
kind: shell
disablesourceinput: true # Do not pass source as argument to the command line
dependson:
- "source#rubyDockerImageLatestVersion"
spec:
# The final ".1" is added to ruby version by Chocolatey
command: curl --silent --show-error --location --fail --output /dev/null https://community.chocolatey.org/packages/ruby/{{ source "rubyDockerImageLatestVersion" }}.1
Expand Down

0 comments on commit 9ce4542

Please sign in to comment.