Skip to content

Commit

Permalink
ci.yml: Update MODULE_VER creation logic to use bash splitting (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeGat committed Aug 21, 2024
1 parent 1a5925b commit 41448b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ jobs:
DEP_VER=$(yq ".spack.packages.\"$DEP\".require[0] | match(\"^@(?:git.)?([^=]*)\").captures[0].string" spack.yaml)
fi
MODULE_VER=$(yq ".spack.modules.default.tcl.projections.\"$DEP\" | split(\"/\") | .[1]" spack.yaml)
MODULE_NAME=$(yq ".spack.modules.default.tcl.projections.\"$DEP\"" spack.yaml)
MODULE_VER="${MODULE_NAME#*/}" # Get 'version' from 'name/version' module, even if version contains '/'
if [[ "$DEP_VER" != "$MODULE_VER" ]]; then
echo "::error::$DEP: Version of dependency and projection do not match ($DEP_VER != $MODULE_VER)"
Expand Down

0 comments on commit 41448b8

Please sign in to comment.