Skip to content

Commit

Permalink
Revert "Use node 'current' in UT, allow disable (#100)" (#101)
Browse files Browse the repository at this point in the history
This reverts commit 6985c77.
  • Loading branch information
mshanemc committed May 9, 2024
1 parent 6985c77 commit 46ed893
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions .github/actions/determineNodeVersions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ runs:
shell: bash
id: node-versions
run: |
# Current can be disabled by setting the GHA var "UT_DISABLE_NODE_CURRENT" to "true"
# IF "NODE_VERSION" is overridden, "NODE_VERSION_CURRENT" will also be disabled
NODE_VERSION_CURRENT="current"
NODE_VERSION="${{ inputs.nodeVersionOverride || 'lts/*' }}"
NODE_PREVIOUS_LTS="lts/-1"
Expand All @@ -36,30 +33,16 @@ runs:
fi
{
echo "nodeVersions<<EOF"
if [ "$NODE_VERSION" = "lts/*" ] && [ "${{ vars.UT_DISABLE_NODE_CURRENT }}" != "true" ]; then
jq -n --arg v1 "$NODE_VERSION_CURRENT" --arg v2 "$NODE_VERSION" --arg v3 "$NODE_PREVIOUS_LTS" '[$v1, $v2, $v3]'
else
jq -n --arg v1 "$NODE_VERSION" --arg v2 "$NODE_PREVIOUS_LTS" '[$v1, $v2]'
fi
echo "EOF"
echo 'nodeVersions<<EOF'
jq -n --arg v1 "$NODE_VERSION" --arg v2 "$NODE_PREVIOUS_LTS" '[$v1, $v2]'
echo EOF
} >> "$GITHUB_OUTPUT"
# Sample output looks like this:
#
# nodeVersions<<EOF
# [
# "current",
# "lts/*",
# "lts/-1",
# ]
# EOF
#
# OR...
#
# nodeVersions<<EOF
# [
# "18.15.0",
# "16"
# "17"
# ]
# EOF

0 comments on commit 46ed893

Please sign in to comment.