Skip to content

Commit 432643f

Browse files
authored
Merge branch 'main' into patch-2
2 parents 509adf9 + 5960a67 commit 432643f

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

ci/release-image/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ RUN apt-get update \
1010
man \
1111
nano \
1212
git \
13+
git-lfs \
1314
procps \
1415
openssh-client \
1516
sudo \
1617
vim.tiny \
1718
lsb-release \
19+
&& git lfs install \
1820
&& rm -rf /var/lib/apt/lists/*
1921

2022
# https://wiki.debian.org/Locale#Manually

install.sh

+14-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The remote host must have internet access.
2323
${not_curl_usage-}
2424
Usage:
2525
26-
$arg0 [--dry-run] [--version X.X.X] [--method detect] \
26+
$arg0 [--dry-run] [--version X.X.X] [--edge] [--method detect] \
2727
[--prefix ~/.local] [--rsh ssh] [user@host]
2828
2929
--dry-run
@@ -32,6 +32,9 @@ Usage:
3232
--version X.X.X
3333
Install a specific version instead of the latest.
3434
35+
--edge
36+
Install the latest edge version instead of the latest stable version.
37+
3538
--method [detect | standalone]
3639
Choose the installation method. Defaults to detect.
3740
- detect detects the system package manager and tries to use it.
@@ -71,8 +74,12 @@ EOF
7174
}
7275

7376
echo_latest_version() {
74-
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
75-
version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/cdr/code-server/releases/latest)"
77+
if [ "${EDGE-}" ]; then
78+
version="$(curl -fsSL https://api.github.com/repos/cdr/code-server/releases | awk 'match($0,/.*"html_url": "(.*\/releases\/tag\/.*)".*/)' | head -n 1 | awk -F '"' '{print $4}')"
79+
else
80+
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
81+
version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/cdr/code-server/releases/latest)"
82+
fi
7683
version="${version#https://github.com/cdr/code-server/releases/tag/}"
7784
version="${version#v}"
7885
echo "$version"
@@ -135,6 +142,7 @@ main() {
135142
OPTIONAL \
136143
ALL_FLAGS \
137144
RSH_ARGS \
145+
EDGE \
138146
RSH
139147

140148
ALL_FLAGS=""
@@ -170,6 +178,9 @@ main() {
170178
--version=*)
171179
VERSION="$(parse_arg "$@")"
172180
;;
181+
--edge)
182+
EDGE=1
183+
;;
173184
--rsh)
174185
RSH="$(parse_arg "$@")"
175186
shift

0 commit comments

Comments
 (0)