Skip to content

Commit fb32656

Browse files
committed
feat(release): support for installer on ubuntu 22.04 & 24.04 only
1 parent 0364d5c commit fb32656

File tree

2 files changed

+19
-79
lines changed

2 files changed

+19
-79
lines changed

.github/workflows/ai-codespark-release.yml

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,7 @@ on:
66
- created
77

88
jobs:
9-
build-container:
10-
strategy:
11-
matrix:
12-
include:
13-
- os: ubuntu-latest
14-
platform: linux
15-
arch: x64
16-
ubuntu_version: "18.04"
17-
docker_image: "ubuntu:18.04"
18-
- os: ubuntu-latest
19-
platform: linux
20-
arch: x64
21-
ubuntu_version: "20.04"
22-
docker_image: "ubuntu:20.04"
23-
runs-on: ${{ matrix.os }}
24-
steps:
25-
- name: Build in container
26-
run: |
27-
docker run --rm -v ${{ github.workspace }}:/host-workspace ${{ matrix.docker_image }} bash -c "
28-
export DEBIAN_FRONTEND=noninteractive
29-
apt-get update
30-
apt-get install -y sudo curl wget git build-essential xz-utils lsb-release
31-
git clone --depth=1 ${{ github.server_url }}/${{ github.repository }}.git /workspace
32-
cd /workspace
33-
git fetch origin ${{ github.sha }}
34-
git checkout ${{ github.sha }}
35-
chmod +x build-installer.sh
36-
./build-installer.sh
37-
mv claude-installer.tar.gz claude-installer-linux-x64-ubuntu${{ matrix.ubuntu_version }}.tar.gz
38-
cp claude-installer-linux-x64-ubuntu${{ matrix.ubuntu_version }}.tar.gz /host-workspace/
39-
cp -r claude-installer /host-workspace/
40-
"
41-
shell: bash
42-
- name: Upload artifacts
43-
uses: actions/upload-artifact@v4
44-
with:
45-
name: claude-installer-${{ matrix.platform }}-${{ matrix.arch }}-ubuntu${{ matrix.ubuntu_version }}
46-
path: |
47-
claude-installer-${{ matrix.platform }}-${{ matrix.arch }}-ubuntu${{ matrix.ubuntu_version }}.tar.gz
48-
49-
build-native:
9+
build:
5010
strategy:
5111
matrix:
5212
include:
@@ -82,8 +42,7 @@ jobs:
8242
contents: write
8343
runs-on: ubuntu-latest
8444
needs:
85-
- build-container
86-
- build-native
45+
- build
8746
steps:
8847
- name: Checkout
8948
uses: actions/checkout@v4
@@ -101,7 +60,5 @@ jobs:
10160
tag_name: ${{ github.ref_name }}
10261
token: ${{ secrets.AI_CODESPARK_TOKEN }}
10362
files: |
104-
artifacts/claude-installer-linux-x64-ubuntu18.04/claude-installer-linux-x64-ubuntu18.04.tar.gz
105-
artifacts/claude-installer-linux-x64-ubuntu20.04/claude-installer-linux-x64-ubuntu20.04.tar.gz
10663
artifacts/claude-installer-linux-x64-ubuntu22.04/claude-installer-linux-x64-ubuntu22.04.tar.gz
10764
artifacts/claude-installer-linux-x64-ubuntu24.04/claude-installer-linux-x64-ubuntu24.04.tar.gz

build-installer.sh

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,16 @@ echo "System GLIBC version: $GLIBC_VERSION"
1111

1212
# Choose Node.js version based on GLIBC compatibility
1313
# Research shows that Node.js compatibility with GLIBC is complex
14-
# Let's use specific versions known to work with Ubuntu 18.04
14+
## Supported: Ubuntu 22.04 and 24.04 only
1515
echo "GLIBC version detected: $GLIBC_VERSION"
1616

17-
if [[ $(echo "$GLIBC_VERSION 2.28" | awk '{print ($1 >= $2)}') == 1 ]]; then
18-
NODE_VERSION="20.17.0" # Latest LTS for systems with GLIBC 2.28+
19-
echo "Using Node.js $NODE_VERSION (requires GLIBC 2.28+)"
20-
elif [[ "$GLIBC_VERSION" == "2.27" ]] || [[ $(echo "$GLIBC_VERSION 2.27" | awk '{print ($1 == $2)}') == 1 ]]; then
21-
# Ubuntu 18.04 specific - use Node.js 16.20.2 (has better Web API support including ReadableStream)
22-
NODE_VERSION="16.20.2" # Later 16.x version with Web API support for Ubuntu 18.04
23-
echo "Using Node.js $NODE_VERSION (Ubuntu 18.04 compatible, GLIBC 2.27, with Web APIs)"
24-
elif [[ $(echo "$GLIBC_VERSION 2.17" | awk '{print ($1 >= $2)}') == 1 ]]; then
25-
NODE_VERSION="16.20.2" # Safe choice for systems with GLIBC 2.17+
26-
echo "Using Node.js $NODE_VERSION (requires GLIBC 2.17+, Ubuntu 18.04 compatible, with Web APIs)"
17+
if [[ $(echo "$GLIBC_VERSION 2.35" | awk '{print ($1 >= $2)}') == 1 ]]; then
18+
NODE_VERSION="20.17.0" # Latest LTS for Ubuntu 22.04/24.04
19+
echo "Using Node.js $NODE_VERSION (Ubuntu 22.04/24.04 compatible, GLIBC 2.35+)"
2720
else
28-
NODE_VERSION="14.21.3" # Fallback for very old systems
29-
echo "Using Node.js $NODE_VERSION (fallback for very old systems)"
21+
echo "ERROR: Only Ubuntu 22.04/24.04 (GLIBC 2.35+) is supported."
22+
exit 1
23+
fi
3024
fi
3125

3226
NODE_ARCH="linux-x64"
@@ -53,26 +47,15 @@ echo "Detected Ubuntu version: $UBUNTU_VERSION"
5347
echo "Detected GLIBC version: $GLIBC_VERSION"
5448

5549
# Determine appropriate Node.js version based on GLIBC compatibility
56-
if [[ $(echo "$GLIBC_VERSION 2.28" | awk '{print ($1 >= $2)}') == 1 ]]; then
57-
REQUIRED_NODE_VERSION="18"
58-
NODE_SETUP_SCRIPT="setup_18.x"
59-
MANUAL_NODE_VERSION="18.20.4"
60-
echo "GLIBC $GLIBC_VERSION supports Node.js v18+"
61-
elif [[ "$GLIBC_VERSION" == "2.27" ]] || [[ $(echo "$GLIBC_VERSION 2.27" | awk '{print ($1 == $2)}') == 1 ]]; then
62-
REQUIRED_NODE_VERSION="16"
63-
NODE_SETUP_SCRIPT="setup_16.x"
64-
MANUAL_NODE_VERSION="16.20.2" # Later version with Web API support for Ubuntu 18.04
65-
echo "GLIBC $GLIBC_VERSION supports Node.js v16 (Ubuntu 18.04 compatible with Web APIs)"
66-
elif [[ $(echo "$GLIBC_VERSION 2.17" | awk '{print ($1 >= $2)}') == 1 ]]; then
67-
REQUIRED_NODE_VERSION="16"
68-
NODE_SETUP_SCRIPT="setup_16.x"
69-
MANUAL_NODE_VERSION="16.20.2"
70-
echo "GLIBC $GLIBC_VERSION supports Node.js v16"
50+
if [[ $(echo "$GLIBC_VERSION 2.35" | awk '{print ($1 >= $2)}') == 1 ]]; then
51+
REQUIRED_NODE_VERSION="20"
52+
NODE_SETUP_SCRIPT="setup_20.x"
53+
MANUAL_NODE_VERSION="20.17.0"
54+
echo "GLIBC $GLIBC_VERSION supports Node.js v20 (Ubuntu 22.04/24.04 compatible)"
7155
else
72-
REQUIRED_NODE_VERSION="14"
73-
NODE_SETUP_SCRIPT="setup_14.x"
74-
MANUAL_NODE_VERSION="14.21.3"
75-
echo "GLIBC $GLIBC_VERSION requires older Node.js v14"
56+
echo "ERROR: Only Ubuntu 22.04/24.04 (GLIBC 2.35+) is supported."
57+
exit 1
58+
fi
7659
fi
7760

7861
if command -v node >/dev/null 2>&1; then
@@ -365,8 +348,8 @@ echo " 2. Extract: tar xzf claude-installer.tar.gz"
365348
echo " 3. Install: ./claude-installer/install.sh"
366349
echo ""
367350
echo "Requirements on target system:"
368-
echo " - Ubuntu 18.04 or higher (x64)"
369-
echo " - GLIBC 2.17+ (included in Ubuntu 18.04+)"
351+
echo " - Ubuntu 22.04 or 24.04 (x64)"
352+
echo " - GLIBC 2.35+ (included in Ubuntu 22.04/24.04)"
370353
echo " - No Node.js installation required!"
371354
echo " - All dependencies included!"
372355
echo ""

0 commit comments

Comments
 (0)