Skip to content

Commit 59a65d1

Browse files
committed
build from sources every time in get_code_server_rpm.sh, do not download third party binary (#2356)
1 parent d51cb63 commit 59a65d1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

codeserver/ubi9-python-3.12/get_code_server_rpm.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ UNAME_TO_GOARCH["s390x"]="s390x"
1717

1818
ARCH="${UNAME_TO_GOARCH[$(uname -m)]}"
1919

20-
if [[ "$ARCH" == "ppc64le" ]]; then
20+
if [[ "$ARCH" == "amd64" || "$ARCH" == "arm64" ||"$ARCH" == "ppc64le" ]]; then
2121

2222
export MAX_JOBS=${MAX_JOBS:-$(nproc)}
2323
export NODE_VERSION=${NODE_VERSION:-20}
@@ -72,11 +72,12 @@ if [[ "$ARCH" == "ppc64le" ]]; then
7272

7373
# build codeserver rpm
7474
VERSION=${CODESERVER_VERSION/v/} npm run package
75-
cp release-packages/code-server-${CODESERVER_VERSION/v/}-ppc64le.rpm /tmp/
75+
cp release-packages/code-server-${CODESERVER_VERSION/v/}-${ARCH}.rpm /tmp/
7676

7777
else
7878

79-
# download RPM for other architectures
80-
curl -L "https://github.com/coder/code-server/releases/download/${CODESERVER_VERSION}/code-server-${CODESERVER_VERSION/v/}-${ARCH}.rpm" -o /tmp/code-server-${CODESERVER_VERSION/v/}-${ARCH}.rpm
79+
# we shall not download rpm for other architectures
80+
echo "Unsupported architecture: $ARCH" >&2
81+
exit 1
8182

8283
fi

0 commit comments

Comments
 (0)