File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Script to check if Biome version in package.json matches the version in .github/workflows/biome.yml
4
+
5
+ # Extract Biome version from package.json (removing the ^ if present)
6
+ PACKAGE_VERSION=$( grep -o ' "@biomejs/biome": "\^*[0-9.]*"' package.json | grep -o ' [0-9.]*' )
7
+
8
+ # Extract Biome version from .github/workflows/biome.yml
9
+ WORKFLOW_VERSION=$( grep -o ' version: "[0-9.]*"' .github/workflows/biome.yml | grep -o ' [0-9.]*' )
10
+
11
+ echo " Biome version in package.json: $PACKAGE_VERSION "
12
+ echo " Biome version in workflow file: $WORKFLOW_VERSION "
13
+
14
+ # Check if versions match
15
+ if [ " $PACKAGE_VERSION " != " $WORKFLOW_VERSION " ]; then
16
+ echo " Error: Biome versions do not match!"
17
+ echo " Please update the version in .github/workflows/biome.yml to match the version in package.json."
18
+ exit 1
19
+ else
20
+ echo " Biome versions match."
21
+ fi
You can’t perform that action at this time.
0 commit comments