File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -27,21 +27,34 @@ jobs:
2727 - name : Get latest TailwindCSS version
2828 id : get_tailwind_version
2929 run : |
30+ set -e
3031 LATEST_TAILWIND_VERSION=$(curl -s https://api.github.com/repos/tailwindlabs/tailwindcss/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
32+ if [ -z "$LATEST_TAILWIND_VERSION" ]; then
33+ echo "Error: Failed to fetch latest TailwindCSS version from GitHub API." >&2
34+ exit 1
35+ fi
3136 echo "Latest TailwindCSS version: $LATEST_TAILWIND_VERSION"
3237 echo "TAILWINDCSS_VERSION=$LATEST_TAILWIND_VERSION" >> $GITHUB_ENV
3338 echo "TAILWINDCSS_VERSION_CLEAN=${LATEST_TAILWIND_VERSION//v/}" >> $GITHUB_ENV
34-
3539 - name : Get current version from csproj
3640 id : get_current_version
3741 run : |
42+ set -e
3843 CURRENT_VERSION=$(grep -oP '<Version>\K[^<]+' ./DotnetDevKR.TailwindCSS/DotnetDevKR.TailwindCSS.csproj)
44+ if [ -z "$CURRENT_VERSION" ]; then
45+ echo "Error: Failed to extract current version from csproj file." >&2
46+ exit 1
47+ fi
3948 echo "Current version: $CURRENT_VERSION"
4049 echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
4150
4251 # Extract library version and TailwindCSS version
4352 LIB_VERSION=$(echo $CURRENT_VERSION | cut -d'+' -f1)
4453 CURRENT_TAILWIND_VERSION=$(echo $CURRENT_VERSION | cut -d'+' -f2 | sed 's/v//')
54+ if [ -z "$LIB_VERSION" ] || [ -z "$CURRENT_TAILWIND_VERSION" ]; then
55+ echo "Error: Malformed version string in csproj file." >&2
56+ exit 1
57+ fi
4558
4659 echo "Current library version: $LIB_VERSION"
4760 echo "Current TailwindCSS version: $CURRENT_TAILWIND_VERSION"
You can’t perform that action at this time.
0 commit comments