From: Peter Amstutz Date: Mon, 15 Feb 2021 21:28:18 +0000 (-0500) Subject: Make it easier to configure arvados in vscode X-Git-Url: https://git.arvados.org/arvados-vscode-cwl-training.git/commitdiff_plain/3261ab597f336034472ba1148793fb49735d1b2d Make it easier to configure arvados in vscode Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/.vscode/tasks.json b/.vscode/tasks.json index cde038f..66d52b3 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,7 +16,7 @@ { "label": "Configure Arvados", "type": "shell", - "command": "scripts/configure-arv ${input:api_host} ${input:api_token}", + "command": "scripts/configure-arv '${input:api_info}'", "problemMatcher": [] }, { @@ -28,15 +28,9 @@ ], "inputs": [ { - "id": "api_host", + "id": "api_info", "type": "promptString", - "description": "Value for ARVADOS_API_HOST" - }, - { - "id": "api_token", - "type": "promptString", - "description": "Value for ARVADOS_API_TOKEN", - "password": true + "description": "Current API_TOKEN and API_HOST from Workbench" }, { "id": "project_uuid", diff --git a/scripts/configure-arv b/scripts/configure-arv index 6bd865c..5a58be3 100755 --- a/scripts/configure-arv +++ b/scripts/configure-arv @@ -1,4 +1,4 @@ #!/bin/sh -echo $1 > API_HOST -echo $2 > API_TOKEN +echo "$*" | sed 's/.*ARVADOS_API_TOKEN=\([^ ]*\).*/\1/' > API_TOKEN +echo "$*" | sed 's/.*ARVADOS_API_HOST=\([^ ]*\).*/\1/' > API_HOST chmod og-rw API_HOST API_TOKEN \ No newline at end of file