Skip to content

Commit aa3e1b1

Browse files
authored
Merge pull request #60 from cron-eu/clitools-update
Update clitools to latest 2.10.1 for PHP 8.4 compatibility
2 parents 3dae94a + 859e377 commit aa3e1b1

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,13 @@ RUN npm install -g yarn bower
209209
# Install latest release of clitools (ct)
210210
RUN <<-EOF
211211
set -ex
212-
latest_url=https://github.com/cron-eu/clitools/releases/download/2.8.0/clitools.phar
213-
test "${PHP_MINOR_VERSION}" = "7.0" && latest_url=https://github.com/kitzberger/clitools/releases/download/2.5.4/clitools.phar
214-
curl -fsSLo /usr/local/bin/ct $latest_url
212+
if [ "${PHP_MINOR_VERSION}" = "8.1" ]; then
213+
CLITOOLS_VERSION="2.9.0"
214+
else
215+
# Get the latest version from GitHub API
216+
CLITOOLS_VERSION=$(curl -s https://api.github.com/repos/cron-eu/clitools/releases/latest | grep -m1 '"tag_name":' | cut -d'"' -f4)
217+
fi
218+
curl -fsSLo /usr/local/bin/ct https://github.com/cron-eu/clitools/releases/download/${CLITOOLS_VERSION}/clitools.phar
215219
chmod 777 /usr/local/bin/ct
216220
EOF
217221

0 commit comments

Comments
 (0)