diff --git a/WORKSPACE.yaml b/WORKSPACE.yaml index c7dbba45d40b06..081b3a69136835 100644 --- a/WORKSPACE.yaml +++ b/WORKSPACE.yaml @@ -5,7 +5,7 @@ defaultArgs: npmPublishTrigger: "false" publishToNPM: true localAppVersion: unknown - codeCommit: 128bab190731bc4af1a6e58b9324110a0d087884 + codeCommit: f14b5f5730b57a05656c1fef9de2f2c22ee8a0c1 defaultVariant: srcs: diff --git a/components/ide/code/bin/code b/components/ide/code/bin/code index d89524d91375aa..047c2ce33fbb9c 100755 --- a/components/ide/code/bin/code +++ b/components/ide/code/bin/code @@ -1,2 +1,2 @@ #!/usr/bin/env sh -/ide/node /ide/out/gitpod-cli.js "$@" +exec /ide/bin/gitpod-code "$@" \ No newline at end of file diff --git a/components/ide/code/bin/gitpod-code b/components/ide/code/bin/gitpod-code deleted file mode 100755 index ebc3d54c228ded..00000000000000 --- a/components/ide/code/bin/gitpod-code +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env sh -/ide/node /ide/out/gitpod-cli.js "$@" \ No newline at end of file diff --git a/components/ide/code/bin/gp-code b/components/ide/code/bin/gp-code new file mode 100755 index 00000000000000..047c2ce33fbb9c --- /dev/null +++ b/components/ide/code/bin/gp-code @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +exec /ide/bin/gitpod-code "$@" \ No newline at end of file diff --git a/components/ide/code/bin/open b/components/ide/code/bin/open index d89524d91375aa..047c2ce33fbb9c 100755 --- a/components/ide/code/bin/open +++ b/components/ide/code/bin/open @@ -1,2 +1,2 @@ #!/usr/bin/env sh -/ide/node /ide/out/gitpod-cli.js "$@" +exec /ide/bin/gitpod-code "$@" \ No newline at end of file diff --git a/components/ide/code/leeway.Dockerfile b/components/ide/code/leeway.Dockerfile index 3997d50cbc0f90..44629fee5feb97 100644 --- a/components/ide/code/leeway.Dockerfile +++ b/components/ide/code/leeway.Dockerfile @@ -20,30 +20,38 @@ RUN mkdir gp-code \ WORKDIR /gp-code RUN yarn --frozen-lockfile --network-timeout 180000 RUN yarn --cwd ./extensions compile -RUN yarn gulp gitpod-min - -# grant write permissions for built-in extensions -RUN chmod -R ugo+w /gitpod-pkg-server/extensions - -# cli config +RUN yarn gulp vscode-web-min +RUN yarn gulp vscode-reh-linux-x64-min + +# config for first layer needed by blobserve +# we also remove `static/` from resource urls as that's needed by blobserve, +# this custom urls will be then replaced by blobserve. +# Check pkg/blobserve/blobserve.go, `inlineVars` method +RUN cp /vscode-web/out/vs/gitpod/browser/workbench/workbench.html /vscode-web/index.html \ + && sed -i -e 's#static/##g' /vscode-web/index.html + +# cli config: alises to gitpod-code +# can't use relative symlink as they break when copied to the image below COPY bin /ide/bin RUN chmod -R ugo+x /ide/bin +# grant write permissions for built-in extensions +RUN chmod -R ugo+w /vscode-reh-linux-x64/extensions FROM scratch # copy static web resources in first layer to serve from blobserve -COPY --from=code_installer --chown=33333:33333 /gitpod-pkg-web/ /ide/ -COPY --from=code_installer --chown=33333:33333 /gitpod-pkg-server/ /ide/ +COPY --from=code_installer --chown=33333:33333 /vscode-web/ /ide/ +COPY --from=code_installer --chown=33333:33333 /vscode-reh-linux-x64/ /ide/ COPY --chown=33333:33333 startup.sh supervisor-ide-config.json /ide/ -# cli config COPY --from=code_installer --chown=33333:33333 /ide/bin /ide/bin + ENV GITPOD_ENV_APPEND_PATH /ide/bin: # editor config -ENV GITPOD_ENV_SET_EDITOR /ide/bin/code +ENV GITPOD_ENV_SET_EDITOR /ide/bin/gitpod-code ENV GITPOD_ENV_SET_VISUAL "$GITPOD_ENV_SET_EDITOR" ENV GITPOD_ENV_SET_GP_OPEN_EDITOR "$GITPOD_ENV_SET_EDITOR" ENV GITPOD_ENV_SET_GIT_EDITOR "$GITPOD_ENV_SET_EDITOR --wait" -ENV GITPOD_ENV_SET_GP_PREVIEW_BROWSER "/ide/bin/code --preview" -ENV GITPOD_ENV_SET_GP_EXTERNAL_BROWSER "/ide/bin/code --openExternal" +ENV GITPOD_ENV_SET_GP_PREVIEW_BROWSER "/ide/bin/gitpod-code --preview" +ENV GITPOD_ENV_SET_GP_EXTERNAL_BROWSER "/ide/bin/gitpod-code --openExternal" diff --git a/components/ide/code/startup.sh b/components/ide/code/startup.sh index f932fd2def40cc..1ba27c4e1ab649 100755 --- a/components/ide/code/startup.sh +++ b/components/ide/code/startup.sh @@ -37,7 +37,7 @@ grep -rl open-vsx.org /ide | xargs sed -i "s|https://open-vsx.org|$VSX_REGISTRY_ cd /ide || exit if [ "$SUPERVISOR_DEBUG_ENABLE" = "true" ]; then - exec /ide/node --inspect ./out/gitpod.js "$@" --verbose --log=trace + exec /ide/server.sh --inspect --verbose --log trace --connectionToken 00000 "$@" else - exec /ide/node ./out/gitpod.js "$@" + exec /ide/server.sh --connectionToken 00000 "$@" fi