Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Use 'next' version of yaml-ls (redhat-developer#378)
Browse files Browse the repository at this point in the history
* Use 'next' version of yaml-ls

Signed-off-by: Yevhen Vydolob <[email protected]>

* update yaml-ls version

Signed-off-by: Yevhen Vydolob <[email protected]>

* Add check on release that there are no 'next' version

Signed-off-by: Yevhen Vydolob <[email protected]>

* Reorder scripts

Signed-off-by: Yevhen Vydolob <[email protected]>
  • Loading branch information
evidolob authored Oct 12, 2020
1 parent 64f22a9 commit a510c06
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 7 deletions.
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ node('rhel8'){
stage 'Build vscode-yaml'
sh "npm install"
sh "npm run build"
sh "npm run check-dependencies"

stage 'Test vscode-yaml for staging'
wrap([$class: 'Xvnc']) {
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
},
"scripts": {
"build": "npm run clean && npm run lint && npm run vscode:prepublish",
"check-dependencies": "node .scripts/check-dependencies.js",
"clean": "rimraf out",
"compile": "tsc -watch -p ./",
"format": "prettier --write .",
Expand Down Expand Up @@ -184,6 +185,6 @@
"vscode-languageclient": "5.2.1",
"vscode-nls": "^3.2.1",
"vscode-uri": "^2.0.3",
"yaml-language-server": "0.11.1"
"yaml-language-server": "next"
}
}
21 changes: 21 additions & 0 deletions scripts/check-dependencies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */

//check package.json do not have dependency with 'next' version

/* eslint-disable @typescript-eslint/no-var-requires */

const exit = require('process').exit;
const dependencies = require('../package.json').dependencies;

for (const dep in dependencies) {
if (Object.prototype.hasOwnProperty.call(dependencies, dep)) {
const version = dependencies[dep];
if (version === 'next') {
console.error(`Dependency ${dep} has "${version}" version, please change it to fixed version`);
exit(1);
}
}
}

0 comments on commit a510c06

Please sign in to comment.