Skip to content

Commit

Permalink
errors out of sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
BBBmau committed Feb 7, 2025
1 parent 29aef23 commit 6657cc2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/get-version-matrix.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

Expand All @@ -14,4 +15,12 @@ function get_latest_version() {
fi
}

echo "matrix=[$(get_latest_version v1.0), $(get_latest_version v1.3), $(get_latest_version v1.5), $(get_latest_version v1.7), $(get_latest_version v1.9)]" >> "$GITHUB_OUTPUT"
# Call get_latest_version for each version and handle errors
v1_0=$(get_latest_version v1.0) || exit 1
v1_3=$(get_latest_version v1.3) || exit 1
v1_5=$(get_latest_version v1.5) || exit 1
v1_7=$(get_latest_version v1.7) || exit 1
v1_9=$(get_latest_version v1.9) || exit 1

# Construct the matrix
echo "matrix=[$v1_0, $v1_3, $v1_5, $v1_7, $v1_9]"

0 comments on commit 6657cc2

Please sign in to comment.