Skip to content

Commit

Permalink
Update browserslist script
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagofilipenunes committed Aug 29, 2024
1 parent aa95c66 commit e2cb13f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/update_browserslist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ if [ -z "$GITHUB_WORKSPACE" ]; then
exit 1
fi

INSTALLED_VERSION=$(yarn info caniuse-lite version | sed -n '2p' | sed 's/\x1b\[[0-9;]*m//g')

# Run the update and store the output
OUTPUT=$(npx update-browserslist-db@latest)
{
Expand All @@ -17,8 +15,9 @@ OUTPUT=$(npx update-browserslist-db@latest)
echo EOF
} >> "$GITHUB_OUTPUT"

# Extract and save version information
LATEST_VERSION=$(yarn info caniuse-lite version | sed -n '2p' | sed 's/\x1b\[[0-9;]*m//g')

INSTALLED_VERSION=$(echo "$OUTPUT" | grep 'Installed version:' | awk '{print $3}' | sed 's/\x1b\[[0-9;]*m//g')
echo "latest_version=$LATEST_VERSION" >> "$GITHUB_OUTPUT"
echo "installed_version=$INSTALLED_VERSION" >> "$GITHUB_OUTPUT"

Expand Down

0 comments on commit e2cb13f

Please sign in to comment.