diff --git a/.travis.old.yml b/.travis.old.yml deleted file mode 100644 index 2b98d2d..0000000 --- a/.travis.old.yml +++ /dev/null @@ -1,34 +0,0 @@ -jobs: - include: - - stage: Deploy Server - if: &release_tag tag =~ /^\d+\.\d+\.\d+$/ - dist: bionic - language: python - python: 3.7 - before_install: - - cd server - script: - - python3 setup.py sdist bdist_wheel - - twine upload --skip-existing dist/* - - - stage: Deploy Clients - name: VSCode - if: *release_tag - language: node_js - node_js: node - install: - - cd client/vscode - - npm ci - script: - - npm version ${TRAVIS_TAG} - - vsce publish -p ${VSCE_TOKEN} - - - stage: Deploy Clients - name: IntelliJ - if: *release_tag - language: java - jdk: openjdk8 - before_install: - - cd client/intellij - script: - - ./gradlew publishPlugin -Ptoken=${INTELLIJ_TOKEN} diff --git a/client/vscode/src/extension.ts b/client/vscode/src/extension.ts index 76329f7..2548f1b 100644 --- a/client/vscode/src/extension.ts +++ b/client/vscode/src/extension.ts @@ -90,9 +90,14 @@ export async function activate(context: ExtensionContext) { throw new Error(`${language}.pythonPath is not set`); } - await promisify(execFile)(pythonPath, [ - "-m", "pip", "install", "--user", "wdl-lsp==" + version, - ]); + const { stdout } = await promisify(execFile)(pythonPath, ["-m", "pip", "show", "wdl-lsp"]); + const versionStr = stdout.split('\n').find(line => line.startsWith('Version:')); + if (!versionStr || versionStr.split(':')[1].trim() !== version) { + await promisify(execFile)(pythonPath, [ + "-m", "pip", "install", "--user", "wdl-lsp==" + version, + ]); + } + client = startLangServer(pythonPath, ["-m", "wdl_lsp"], cwd); }