Skip to content

Commit 4643dd5

Browse files
authored
Merge branch 'main' into jsjoeio/fix-download-artifact
2 parents b2a2488 + ac6b5bd commit 4643dd5

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

.github/workflows/build.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ jobs:
324324
run: tar -xzf package.tar.gz
325325

326326
- name: Install release package dependencies
327-
run: cd release && yarn install
327+
run: cd release && npm install --unsafe-perm --omit=dev
328328

329329
- name: Install dependencies
330330
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@@ -380,7 +380,7 @@ jobs:
380380
run: tar -xzf package.tar.gz
381381

382382
- name: Install release package dependencies
383-
run: cd release && yarn install
383+
run: cd release && npm install --unsafe-perm --omit=dev
384384

385385
- name: Install dependencies
386386
if: steps.cache-node-modules.outputs.cache-hit != 'true'

.github/workflows/release.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ jobs:
4444
run: |
4545
yum install -y epel-release centos-release-scl make
4646
yum install -y devtoolset-9-{make,gcc,gcc-c++} jq rsync python3
47+
# for keytar
48+
yum install -y libsecret-devel
4749
4850
- name: Install nfpm and envsubst
4951
run: |
5052
mkdir -p ~/.local/bin
51-
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
53+
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.22.2/nfpm_2.22.2_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
5254
curl -sSfL https://github.com/a8m/envsubst/releases/download/v1.1.0/envsubst-`uname -s`-`uname -m` -o envsubst
5355
chmod +x envsubst
5456
mv envsubst ~/.local/bin
@@ -170,6 +172,9 @@ jobs:
170172
env:
171173
PACKAGE: ${{ format('g++-{0}', matrix.prefix) }}
172174

175+
- name: Install keytar dependencies
176+
run: sudo apt install -y libsecret-1-dev
177+
173178
- name: Download npm package
174179
uses: actions/download-artifact@v3
175180
with:
@@ -322,7 +327,7 @@ jobs:
322327
323328
echo "Updating version in lib/vscode/product.json"
324329
tmp=$(mktemp)
325-
jq '.codeServerVersion = "$VERSION"' release/lib/vscode/product.json > "$tmp" && mv "$tmp" release/lib/vscode/product.json
330+
jq ".codeServerVersion = \"$VERSION\"" release/lib/vscode/product.json > "$tmp" && mv "$tmp" release/lib/vscode/product.json
326331
# Ensure it has the same permissions as before
327332
chmod 644 release/lib/vscode/product.json
328333

ci/build/build-release.sh

-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ bundle_code_server() {
5656
}
5757
EOF
5858
) > "$RELEASE_PATH/package.json"
59-
rsync yarn.lock "$RELEASE_PATH"
6059
mv npm-shrinkwrap.json "$RELEASE_PATH"
6160

6261
rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh"
@@ -97,12 +96,10 @@ bundle_vscode() {
9796
"$VSCODE_SRC_PATH/remote/package.json" \
9897
"$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json"
9998

100-
rsync "$VSCODE_SRC_PATH/remote/yarn.lock" "$VSCODE_OUT_PATH/yarn.lock"
10199
mv "$VSCODE_SRC_PATH/remote/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/npm-shrinkwrap.json"
102100

103101
# Include global extension dependencies as well.
104102
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions/package.json"
105-
rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions/yarn.lock"
106103
mv "$VSCODE_SRC_PATH/extensions/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/extensions/npm-shrinkwrap.json"
107104
rsync "$VSCODE_SRC_PATH/extensions/postinstall.mjs" "$VSCODE_OUT_PATH/extensions/postinstall.mjs"
108105
}

ci/build/npm-postinstall.sh

+10-9
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,11 @@ main() {
124124
}
125125

126126
install_with_yarn_or_npm() {
127+
echo "User agent: ${npm_config_user_agent-none}"
127128
# NOTE@edvincent: We want to keep using the package manager that the end-user was using to install the package.
128129
# This also ensures that when *we* run `yarn` in the development process, the yarn.lock file is used.
129130
case "${npm_config_user_agent-}" in
130-
yarn*)
131-
if [ -f "yarn.lock" ]; then
132-
yarn --production --frozen-lockfile --no-default-rc
133-
else
134-
echo "yarn.lock file not present, not running in development mode. use npm to install code-server!"
135-
exit 1
136-
fi
137-
;;
138-
npm*)
131+
*npm*)
139132
if [ -f "yarn.lock" ]; then
140133
echo "yarn.lock file present, running in development mode. use yarn to install code-server!"
141134
exit 1
@@ -146,6 +139,14 @@ install_with_yarn_or_npm() {
146139
npm install --unsafe-perm --legacy-peer-deps --omit=dev
147140
fi
148141
;;
142+
yarn*)
143+
if [ -f "yarn.lock" ]; then
144+
yarn --production --frozen-lockfile --no-default-rc
145+
else
146+
echo "yarn.lock file not present, not running in development mode. use npm to install code-server!"
147+
exit 1
148+
fi
149+
;;
149150
*)
150151
echo "Could not determine which package manager is being used to install code-server"
151152
exit 1

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
"nanoid": "^3.1.31",
8484
"minimist": "npm:[email protected]",
8585
"glob-parent": "^6.0.1",
86-
"@types/node": "^16.0.0"
86+
"@types/node": "^16.0.0",
87+
"qs": "^6.7.3"
8788
},
8889
"dependencies": {
8990
"@coder/logger": "^3.0.0",

yarn.lock

+1-6
Original file line numberDiff line numberDiff line change
@@ -2812,18 +2812,13 @@ punycode@^2.1.0:
28122812
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
28132813
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
28142814

2815-
2815+
28162816
version "6.11.0"
28172817
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
28182818
integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
28192819
dependencies:
28202820
side-channel "^1.0.4"
28212821

2822-
2823-
version "6.7.0"
2824-
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
2825-
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
2826-
28272822
queue-microtask@^1.2.2:
28282823
version "1.2.2"
28292824
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.2.tgz#abf64491e6ecf0f38a6502403d4cda04f372dfd3"

0 commit comments

Comments
 (0)