forked from phoedos/pmd
[apex] Improve script to update jorje
This commit is contained in:
@ -1,7 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
URL=https://raw.githubusercontent.com/forcedotcom/salesforcedx-vscode/5e6c90f09c8a5187fffae062b40ecb09ebb7f6a6/packages/salesforcedx-vscode-apex/out/apex-jorje-lsp.jar
|
||||
VERSION=2018-11-21
|
||||
LAST_COMMIT_INFO=$(curl -s "https://api.github.com/repos/forcedotcom/salesforcedx-vscode/commits?sha=develop&path=packages%2Fsalesforcedx-vscode-apex%2Fout%2Fapex-jorje-lsp.jar&page=1&per_page=1")
|
||||
LAST_COMMIT_DATE=$(echo $LAST_COMMIT_INFO | jq -r '.[0].commit.committer.date')
|
||||
LAST_COMMIT_SHA=$(echo $LAST_COMMIT_INFO | jq -r '.[0].sha')
|
||||
|
||||
VERSION=${LAST_COMMIT_DATE%T*}-${LAST_COMMIT_SHA:0:6}
|
||||
|
||||
URL=https://raw.githubusercontent.com/forcedotcom/salesforcedx-vscode/${LAST_COMMIT_SHA}/packages/salesforcedx-vscode-apex/out/apex-jorje-lsp.jar
|
||||
FILENAME=apex-jorje-lsp-${VERSION}.jar
|
||||
FILENAME_MINIMIZED=apex-jorje-lsp-minimized-${VERSION}.jar
|
||||
|
||||
@ -12,7 +17,7 @@ function install() {
|
||||
-DartifactId=apex-jorje-lsp-minimized \
|
||||
-Dversion=${VERSION} \
|
||||
-Dpackaging=jar \
|
||||
-DlocalRepositoryPath=.
|
||||
-DlocalRepositoryPath=$(dirname $0)
|
||||
}
|
||||
|
||||
function download() {
|
||||
|
Reference in New Issue
Block a user