Skip to content

Commit

Permalink
code-server: bump to 4.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Sep 25, 2023
1 parent 7822419 commit 721583c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tur/code-server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/coder/code-server
TERMUX_PKG_DESCRIPTION="Run VS Code on any machine anywhere and access it in the browser"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux-user-repository"
TERMUX_PKG_VERSION="4.16.1"
TERMUX_PKG_VERSION="4.17.0"
TERMUX_PKG_SRCURL=git+https://github.com/coder/code-server
TERMUX_PKG_DEPENDS="libandroid-spawn, libsecret, nodejs-16, ripgrep"
TERMUX_PKG_DEPENDS="libandroid-spawn, libsecret, krb5, nodejs-16, ripgrep"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_NO_STATICSPLIT=true
Expand All @@ -19,16 +19,16 @@ termux_step_post_get_source() {
done
}

_setup_nodejs_16() {
local NODEJS_VERSION=16.20.0
_setup_nodejs_18() {
local NODEJS_VERSION=18.18.0
local NODEJS_FOLDER=${TERMUX_PKG_CACHEDIR}/build-tools/nodejs-${NODEJS_VERSION}

if [ ! -x "$NODEJS_FOLDER/bin/node" ]; then
mkdir -p "$NODEJS_FOLDER"
local NODEJS_TAR_FILE=$TERMUX_PKG_TMPDIR/nodejs-$NODEJS_VERSION.tar.xz
termux_download https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-linux-x64.tar.xz \
"$NODEJS_TAR_FILE" \
dff21020b555cc165a1ac36da7d4f6c810b35409c94e00afc51d5d370aae47ae
3008408e9098f2462f7b1a0f6a48b8a46079beb1c92b6ec43b04713265c96978
tar -xf "$NODEJS_TAR_FILE" -C "$NODEJS_FOLDER" --strip-components=1
fi
export PATH=$NODEJS_FOLDER/bin:$PATH
Expand All @@ -38,12 +38,13 @@ termux_step_host_build() {
export VERSION=$TERMUX_PKG_VERSION
mv $TERMUX_PREFIX/bin $TERMUX_PREFIX/bin.bp
env -i PATH="$PATH" sudo apt update
env -i PATH="$PATH" sudo apt install -yq libxkbfile-dev libsecret-1-dev
_setup_nodejs_16
env -i PATH="$PATH" sudo apt install -yq libxkbfile-dev libsecret-1-dev libkrb5-dev
_setup_nodejs_18
npm install yarn
export PATH="$TERMUX_PKG_HOSTBUILD_DIR/node_modules/.bin:$PATH"
cd $TERMUX_PKG_SRCDIR
yarn --frozen-lockfile
yarn add ternary-stream
yarn build
yarn build:vscode
yarn release
Expand All @@ -54,7 +55,7 @@ termux_step_configure() {
# Remove this marker all the time
rm -rf $TERMUX_HOSTBUILD_MARKER

_setup_nodejs_16
_setup_nodejs_18
export PATH="$TERMUX_PKG_HOSTBUILD_DIR/node_modules/.bin:$PATH"
}

Expand Down

0 comments on commit 721583c

Please sign in to comment.