From 86742bcaec6f292dba645b2208009f9340902560 Mon Sep 17 00:00:00 2001 From: Wojciech Trocki Date: Wed, 3 Aug 2022 10:11:50 +0100 Subject: [PATCH] fix: lock dependency on spectral outside package.json --- spectral/exec/rhoasapi | 4 +++- spectral/package.json | 2 -- spectral/spectral.version | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 spectral/spectral.version diff --git a/spectral/exec/rhoasapi b/spectral/exec/rhoasapi index f08f124..406e6bd 100755 --- a/spectral/exec/rhoasapi +++ b/spectral/exec/rhoasapi @@ -1,5 +1,7 @@ #!/bin/bash -spectral --version || npm install -g @stoplight/spectral +spectral_version=`cat "../spectral.version"` + +spectral --version || npm install -g --force @stoplight/spectral-cli@$spectral_version spectral $@ \ No newline at end of file diff --git a/spectral/package.json b/spectral/package.json index 1f4a955..d30c35e 100644 --- a/spectral/package.json +++ b/spectral/package.json @@ -9,12 +9,10 @@ "clean": "rm -rf dist", "lint": "eslint src/**/*.ts", "copy-ruleset": "cp ./ruleset.yaml ./dist/ruleset.yaml && cp ./package.json ./dist/package.json", - "spectral-lint": "spectral lint --ruleset ./examples/.spectral-local.yaml", "cli-integration-tests": "./scripts/rules.sh", "setupRelease": "npm version" }, "dependencies": { - "@stoplight/spectral-cli": "6.4.2", "@stoplight/spectral-core": "1.12.4" }, "devDependencies": { diff --git a/spectral/spectral.version b/spectral/spectral.version new file mode 100644 index 0000000..04757a5 --- /dev/null +++ b/spectral/spectral.version @@ -0,0 +1 @@ +6.4.2 \ No newline at end of file