From 5f39f20766349280ee9776cae65b827d2998eaf6 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Tue, 21 Dec 2021 14:57:51 +0200 Subject: [PATCH] web/: add check for change to eslint import Change-Id: Idf94c8e0c92d34e840db549e9e704eb3373762ac --- .gitattributes | 1 + Jenkinsfile.public | 2 ++ scripts/check-package-lock.sh | 16 ++++++++++++++++ web/multinode/package-lock.json | 2 +- web/satellite/package-lock.json | 2 +- 5 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .gitattributes create mode 100755 scripts/check-package-lock.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..9319d254a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* linguist-generated=false \ No newline at end of file diff --git a/Jenkinsfile.public b/Jenkinsfile.public index 8e27c2470..c6a9433b8 100644 --- a/Jenkinsfile.public +++ b/Jenkinsfile.public @@ -159,6 +159,8 @@ pipeline { sh 'npm run check' sh 'npm run lint' } + + sh './scripts/check-package-lock.sh' } } stage('Cross Compile') { diff --git a/scripts/check-package-lock.sh b/scripts/check-package-lock.sh new file mode 100755 index 000000000..86fc314b7 --- /dev/null +++ b/scripts/check-package-lock.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -ueo pipefail +set +x + +exitcode=0 + +for component in "satellite" "storagenode" "multinode" +do + if grep -q "eslint-plugin-storj@github:storj/eslint-storj" "./web/$component/package-lock.json"; then + echo "$component/package-lock.json import for eslint-storj should not be changed." + exitcode=-1 + fi +done + +exit $exitcode \ No newline at end of file diff --git a/web/multinode/package-lock.json b/web/multinode/package-lock.json index d04e5b395..b9716a29a 100644 --- a/web/multinode/package-lock.json +++ b/web/multinode/package-lock.json @@ -36191,7 +36191,7 @@ "eslint-plugin-storj": { "version": "git+https://git@github.com/storj/eslint-storj.git#5f952ffab7141e752cc095e5f024c39bab89679f", "dev": true, - "from": "eslint-plugin-storj@github:storj/eslint-storj" + "from": "eslint-plugin-storj@https://github.com/storj/eslint-storj" }, "eslint-plugin-vue": { "version": "7.16.0", diff --git a/web/satellite/package-lock.json b/web/satellite/package-lock.json index f4822750d..15a658b01 100644 --- a/web/satellite/package-lock.json +++ b/web/satellite/package-lock.json @@ -40088,7 +40088,7 @@ "eslint-plugin-storj": { "version": "git+https://git@github.com/storj/eslint-storj.git#5f952ffab7141e752cc095e5f024c39bab89679f", "dev": true, - "from": "eslint-plugin-storj@github:storj/eslint-storj" + "from": "eslint-plugin-storj@https://github.com/storj/eslint-storj" }, "eslint-plugin-vue": { "version": "7.16.0",