Skip to content

Commit

Permalink
Update main.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqxx authored Feb 20, 2025
1 parent f70a8d5 commit 2d3ef92
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

if [ "$INPUT_VERSION" == "latest" ]; then
if [ "$INPUT_VERSION" == "latest-snapshot" ]; then
echo "Fetching the latest snapshot version."
latest_version=$(curl -L $INPUT_MANIFEST_API_URL | jq -r '.latest.snapshot')

Expand All @@ -9,8 +9,21 @@ if [ "$INPUT_VERSION" == "latest" ]; then
exit 1
fi

echo "Using latest version: $latest_version"
echo "Using latest snapshot version: $latest_version"
INPUT_VERSION="$latest_version"

elif [ "$INPUT_VERSION" == "latest-release" ]; then
echo "Fetching the latest release version."
latest_version=$(curl -L $INPUT_MANIFEST_API_URL | jq -r '.latest.release')

if [ -z "$latest_version" ]; then
echo "Error: Could not find the latest release version in the manifest."
exit 1
fi

echo "Using latest release version: $latest_version"
INPUT_VERSION="$latest_version"

else
echo "Using specified version: $INPUT_VERSION"
fi
Expand Down

0 comments on commit 2d3ef92

Please sign in to comment.