Skip to content

Commit 729c028

Browse files
committed
improve generate devworkspace command
Signed-off-by: Valerii Svydenko <vsvydenk@redhat.com>
1 parent b26b3e7 commit 729c028

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.devfile.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,17 @@ commands:
4040
component: builder
4141
workingDir: ${PROJECTS_ROOT}/devworkspace-generator
4242
commandLine: |
43+
DEFAULT_DEVFILE_URL="https://github.com/che-incubator/quarkus-api-example/tree/main"
44+
DEFAULT_EDITOR_URL="https://raw.githubusercontent.com/eclipse-che/che-operator/refs/heads/main/editors-definitions/che-code-insiders.yaml"
45+
echo "Enter devfile URL (default: ${DEFAULT_DEVFILE_URL}):"
46+
read DEVFILE_URL
47+
DEVFILE_URL="${DEVFILE_URL:-${DEFAULT_DEVFILE_URL}}"
48+
echo "Enter editor URL (default: ${DEFAULT_EDITOR_URL}):"
49+
read EDITOR_URL
50+
EDITOR_URL="${EDITOR_URL:-${DEFAULT_EDITOR_URL}}"
4351
node lib/entrypoint.js \
44-
--devfile-url:https://github.com/che-incubator/quarkus-api-example/tree/main \
45-
--editor-url:https://raw.githubusercontent.com/eclipse-che/che-operator/refs/heads/main/editors-definitions/che-code-insiders.yaml \
52+
--devfile-url:"${DEVFILE_URL}" \
53+
--editor-url:"${EDITOR_URL}" \
4654
--output-file:/tmp/devworkspace-che-code-latest.yaml \
4755
--injectDefaultComponent:true \
4856
--defaultComponentImage:registry.access.redhat.com/ubi8/openjdk-11:latest

0 commit comments

Comments
 (0)