Skip to content

Commit

Permalink
chore: question mark
Browse files Browse the repository at this point in the history
  • Loading branch information
teaSummer authored Jun 24, 2024
1 parent 65a6a02 commit b0ecf1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,24 @@ jobs:
id: get
run: |
# Get Last Stable ${{ matrix.subtitle }}
LAST_STABLE_VERSION=`sed -n '/"${{ matrix.subtitle }}"/,/version:/p' launcher.js | sed -n '$p' | sed 's/^.*:\s*"\|",$//gi' | sed 's/\./\\\\./g'`
LAST_STABLE_VERSION=`sed -n '/"${{ matrix.subtitle }}"/,/version:/p' launcher.js | sed -n '$p' | sed 's/^.*:\s*"v\?\|",$//gi' | sed 's/\./\\\\./g'`
# Get Last Dev ${{ matrix.subtitle }}
LAST_DEV_VERSION=`sed -n '/"${{ matrix.subtitle }}"/,/}/p' launcher.js | sed -n '/dev:/,/version:/p' | sed -n '$p' | sed 's/^.*:\s*"\|"$//gi' | sed 's/\./\\\\./g'`
LAST_DEV_VERSION=`sed -n '/"${{ matrix.subtitle }}"/,/}/p' launcher.js | sed -n '/dev:/,/version:/p' | sed -n '$p' | sed 's/^.*:\s*"v\?\|"$//gi' | sed 's/\./\\\\./g'`
# GET Latest Stable ${{ matrix.subtitle }}
if [ '${{ matrix.subtitle }}' = HMCL ]; then
LATEST_STABLE_VERSION=`cat releases.json | sed -n '/"tag_name":\s*"release-/p' | sed -n 1p | sed 's/^.*release-/release-/g' | sed 's/",$//g' | sed 's/\./\\\\./g'`
else
LATEST_STABLE_VERSION=`cat latest.json | jq .tag_name | sed 's/^"\|"$//gi' | sed 's/\./\\\\./g'`
LATEST_STABLE_VERSION=`cat latest.json | jq .tag_name | sed 's/^"v\?\|"$//gi' | sed 's/\./\\\\./g'`
fi
if [ ${#LATEST_STABLE_VERSION} = 0 ]; then
unset LAST_STABLE_VERSION
fi
# GET Latest Dev ${{ matrix.subtitle }}
if [ "$LAST_DEV_VERSION" ]; then
LATEST_DEV_VERSION=`cat releases.json | sed -n '/"tag_name":/p' | sed -n 1p | sed 's/^.*:\s*"\|",$//gi' | sed 's/\./\\\\./g'`
LATEST_DEV_VERSION=`cat releases.json | sed -n '/"tag_name":/p' | sed -n 1p | sed 's/^.*:\s*"v\?\|",$//gi' | sed 's/\./\\\\./g'`
if [ "$LATEST_DEV_VERSION" = "$LATEST_STABLE_VERSION" ]; then
unset LATEST_DEV_VERSION
fi
Expand Down

0 comments on commit b0ecf1e

Please sign in to comment.