Skip to content

Commit f839435

Browse files
committed
fix: use version of spectral from version file
1 parent 86742bc commit f839435

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

spectral/scripts/rules.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## This script tests and validates rules APIs
22

3+
spectral_version=`cat "../spectral.version"`
4+
spectral --version || npm install -g --force @stoplight/spectral-cli@$spectral_version
5+
36
## Fetch current managed services APIS from sdk repository
47
## This apis can be used for testing
58
## Script needs to run in the test working directory
@@ -11,17 +14,17 @@ file='kas-fleet-manager.yaml'
1114

1215
wget -P $folder ${baseUrl}${file}
1316
echo "linting $file OAS file"
14-
yarn spectral lint $folder/$file -v -r $spectralConfig
17+
spectral lint $folder/$file -v -r $spectralConfig
1518

1619
file='srs-fleet-manager.json'
1720
wget -P $folder ${baseUrl}${file}
1821
echo "linting $file OAS file"
19-
yarn spectral lint $folder/$file -v -r $spectralConfig
22+
spectral lint $folder/$file -v -r $spectralConfig
2023

2124
file='connector_mgmt.yaml'
2225
wget -P $folder ${baseUrl}${file}
2326
echo "linting $file OAS file"
24-
yarn spectral lint $folder/$file -v -r $spectralConfig
27+
spectral lint $folder/$file -v -r $spectralConfig
2528

2629
## Updates made to the following need to be refected in their respective .openapi OAS files before the linting can pass and added to CI
2730

0 commit comments

Comments
 (0)