|
66 | 66 |
|
67 | 67 | bundle_vscode() {
|
68 | 68 | mkdir -p "$VSCODE_OUT_PATH"
|
69 |
| - rsync "$VSCODE_SRC_PATH/yarn.lock" "$VSCODE_OUT_PATH" |
70 |
| - rsync "$VSCODE_SRC_PATH/out-vscode-reh-web${MINIFY:+-min}/" "$VSCODE_OUT_PATH/out" |
| 69 | + rsync ./lib/vscode-reh-web-*/ "$VSCODE_OUT_PATH" |
71 | 70 |
|
72 |
| - rsync "$VSCODE_SRC_PATH/.build/extensions/" "$VSCODE_OUT_PATH/extensions" |
73 |
| - if [ "$KEEP_MODULES" = 0 ]; then |
74 |
| - rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules" |
75 |
| - else |
76 |
| - rsync "$VSCODE_SRC_PATH/node_modules/" "$VSCODE_OUT_PATH/node_modules" |
77 |
| - fi |
78 |
| - rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions" |
79 |
| - rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions" |
80 |
| - rsync "$VSCODE_SRC_PATH/extensions/postinstall.js" "$VSCODE_OUT_PATH/extensions" |
81 |
| - |
82 |
| - mkdir -p "$VSCODE_OUT_PATH/resources/" |
83 |
| - rsync "$VSCODE_SRC_PATH/resources/" "$VSCODE_OUT_PATH/resources/" |
84 |
| - |
85 |
| - # TODO: We should look into using VS Code's packaging task (see |
86 |
| - # gulpfile.reh.js). For now copy this directory into the right spot (for some |
87 |
| - # reason VS Code uses a different path in production). |
88 |
| - mkdir -p "$VSCODE_OUT_PATH/bin/helpers" |
89 |
| - rsync "$VSCODE_SRC_PATH/resources/server/bin/helpers/" "$VSCODE_OUT_PATH/bin/helpers" |
90 |
| - chmod +x "$VSCODE_OUT_PATH/bin/helpers/browser.sh" |
91 |
| - |
92 |
| - # Add the commit and date and enable telemetry. This just makes telemetry |
93 |
| - # available; telemetry can still be disabled by flag or setting. |
| 71 | + # Add the commit, date, our name, links, and enable telemetry. This just makes |
| 72 | + # telemetry available; telemetry can still be disabled by flag or setting. |
94 | 73 | jq --slurp '.[0] * .[1]' "$VSCODE_SRC_PATH/product.json" <(
|
95 | 74 | cat << EOF
|
96 | 75 | {
|
97 | 76 | "enableTelemetry": true,
|
98 | 77 | "commit": "$(cd "$VSCODE_SRC_PATH" && git rev-parse HEAD)",
|
99 | 78 | "quality": "stable",
|
100 | 79 | "date": $(jq -n 'now | todate'),
|
101 |
| - "codeServerVersion": "$VERSION" |
| 80 | + "codeServerVersion": "$VERSION", |
| 81 | + "nameShort": "code-server", |
| 82 | + "nameLong": "code-server", |
| 83 | + "applicationName": "code-server", |
| 84 | + "dataFolderName": ".code-server", |
| 85 | + "win32MutexName": "codeserver", |
| 86 | + "licenseUrl": "https://github.com/coder/code-server/blob/main/LICENSE.txt", |
| 87 | + "win32DirName": "code-server", |
| 88 | + "win32NameVersion": "code-server", |
| 89 | + "win32AppUserModelId": "coder.code-server", |
| 90 | + "win32ShellNameShort": "c&ode-server", |
| 91 | + "darwinBundleIdentifier": "com.coder.code.server", |
| 92 | + "linuxIconName": "com.coder.code.server", |
| 93 | + "reportIssueUrl": "https://github.com/coder/code-server/issues/new", |
| 94 | + "documentationUrl": "https://go.microsoft.com/fwlink/?LinkID=533484#vscode", |
| 95 | + "keyboardShortcutsUrlMac": "https://go.microsoft.com/fwlink/?linkid=832143", |
| 96 | + "keyboardShortcutsUrlLinux": "https://go.microsoft.com/fwlink/?linkid=832144", |
| 97 | + "keyboardShortcutsUrlWin": "https://go.microsoft.com/fwlink/?linkid=832145", |
| 98 | + "introductoryVideosUrl": "https://go.microsoft.com/fwlink/?linkid=832146", |
| 99 | + "tipsAndTricksUrl": "https://go.microsoft.com/fwlink/?linkid=852118", |
| 100 | + "newsletterSignupUrl": "https://www.research.net/r/vsc-newsletter", |
| 101 | + "linkProtectionTrustedDomains": [ |
| 102 | + "https://open-vsx.org" |
| 103 | + ] |
102 | 104 | }
|
103 | 105 | EOF
|
104 | 106 | ) > "$VSCODE_OUT_PATH/product.json"
|
105 | 107 |
|
106 |
| - # We remove the scripts field so that later on we can run |
107 |
| - # yarn to fetch node_modules if necessary without build scripts running. |
108 |
| - # We cannot use --no-scripts because we still want dependent package scripts to run. |
109 |
| - jq 'del(.scripts)' < "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json" |
| 108 | + # Use the package.json for the web/remote server. It does not have the right |
| 109 | + # version though so pull that from the main package.json. Also remove keytar |
| 110 | + # since the web does not rely on it and that removes the dependency on |
| 111 | + # libsecret. |
| 112 | + jq --slurp '.[0] * {version: .[1].version} | del(.dependencies.keytar)' \ |
| 113 | + "$VSCODE_SRC_PATH/remote/package.json" \ |
| 114 | + "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json" |
| 115 | + |
| 116 | + rsync "$VSCODE_SRC_PATH/remote/yarn.lock" "$VSCODE_OUT_PATH/yarn.lock" |
| 117 | + |
| 118 | + if [ "$KEEP_MODULES" = 0 ]; then |
| 119 | + rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules" |
| 120 | + rm -Rf "$VSCODE_OUT_PATH/node_modules" |
| 121 | + fi |
110 | 122 |
|
111 | 123 | pushd "$VSCODE_OUT_PATH"
|
112 | 124 | symlink_asar
|
|
0 commit comments