Skip to content

Commit be26e12

Browse files
author
Joe
committed
Revert "Add linkup command to improve link functionality"
This reverts commit 2504f6f.
1 parent 13e91de commit be26e12

File tree

6 files changed

+10
-56
lines changed

6 files changed

+10
-56
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ vendor/modules
1212
node-*
1313
/plugins
1414
/lib/coder-cloud-agent
15-
/lib/linkup
1615
.home
1716
coverage
1817
**/.DS_Store

ci/build/build-code-server.sh

+8-15
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,23 @@ main() {
1515
chmod +x out/node/entry.js
1616
fi
1717

18-
# for arch; we do not use OS from lib.sh and get our own.
19-
# lib.sh normalizes macos to darwin - but cloud-agent's binaries do not
20-
source ./ci/lib.sh
21-
OS="$(uname | tr '[:upper:]' '[:lower:]')"
22-
23-
mkdir -p ./lib
24-
2518
if ! [ -f ./lib/coder-cloud-agent ]; then
2619
echo "Downloading the cloud agent..."
2720

21+
# for arch; we do not use OS from lib.sh and get our own.
22+
# lib.sh normalizes macos to darwin - but cloud-agent's binaries do not
23+
source ./ci/lib.sh
24+
OS="$(uname | tr '[:upper:]' '[:lower:]')"
25+
2826
set +e
2927
curl -fsSL "https://github.com/cdr/cloud-agent/releases/latest/download/cloud-agent-$OS-$ARCH" -o ./lib/coder-cloud-agent
3028
chmod +x ./lib/coder-cloud-agent
3129
set -e
3230
fi
3331

34-
if ! [ -f ./lib/linkup ]; then
35-
echo "Downloading Link agent..."
36-
37-
set +e
38-
curl -fsSL "https://storage.googleapis.com/coder-link-releases/latest/linkup-$OS-$ARCH" -o ./lib/linkup
39-
chmod +x ./lib/linkup
40-
set -e
41-
fi
32+
yarn browserify out/browser/register.js -o out/browser/register.browserified.js
33+
yarn browserify out/browser/pages/login.js -o out/browser/pages/login.browserified.js
34+
yarn browserify out/browser/pages/vscode.js -o out/browser/pages/vscode.browserified.js
4235
}
4336

4437
main "$@"

ci/build/build-release.sh

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ EOF
6161
rsync node_modules/ "$RELEASE_PATH/node_modules"
6262
mkdir -p "$RELEASE_PATH/lib"
6363
rsync ./lib/coder-cloud-agent "$RELEASE_PATH/lib"
64-
rsync ./lib/linkup "$RELEASE_PATH/lib"
6564
fi
6665
}
6766

ci/build/npm-postinstall.sh

-6
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ main() {
6666
echo "Failed to download cloud agent; --link will not work"
6767
fi
6868

69-
if curl -fsSL "https://storage.googleapis.com/coder-link-releases/latest/linkup-$OS-$ARCH" -o ./lib/linkup; then
70-
chmod +x ./lib/linkup
71-
else
72-
echo "Failed to download Link agent; the Link extension will not work"
73-
fi
74-
7569
if ! vscode_yarn; then
7670
echo "You may not have the required dependencies to build the native modules."
7771
echo "Please see https://github.com/cdr/code-server/blob/master/docs/npm.md"

src/node/link.ts

-16
This file was deleted.

src/node/main.ts

+2-17
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { field, logger } from "@coder/logger"
2-
import { ChildProcessWithoutNullStreams } from "child_process"
32
import http from "http"
43
import path from "path"
54
import { Disposable } from "../common/emitter"
6-
import { plural, logError } from "../common/util"
5+
import { plural } from "../common/util"
76
import { createApp, ensureAddress } from "./app"
87
import { AuthType, DefaultedArgs, Feature } from "./cli"
98
import { coderCloudBind } from "./coder_cloud"
10-
import { commit, version, vsRootPath } from "./constants"
11-
import { startLink } from "./link"
9+
import { commit, version } from "./constants"
1210
import { register } from "./routes"
1311
import { humanPath, isFile, loadAMDModule, open } from "./util"
1412

@@ -156,19 +154,6 @@ export const runCodeServer = async (
156154
logger.info(" - Connected to cloud agent")
157155
}
158156

159-
let linkAgent: undefined | ChildProcessWithoutNullStreams
160-
try {
161-
linkAgent = startLink(serverAddress)
162-
linkAgent.on("error", (error) => {
163-
logError(logger, "link daemon", error)
164-
})
165-
linkAgent.on("close", (code) => {
166-
logger.debug("link daemon closed", field("code", code))
167-
})
168-
} catch (error) {
169-
logError(logger, "link daemon", error)
170-
}
171-
172157
if (args.enable && args.enable.length > 0) {
173158
logger.info("Enabling the following experimental features:")
174159
args.enable.forEach((feature) => {

0 commit comments

Comments
 (0)