mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Switch to /etc/os-release on Linux
Improve self-hosted support
This commit is contained in:
parent
4bb4f1812c
commit
8ace7bdc6e
@ -7,7 +7,7 @@ add_couchbase_libs() {
|
||||
else
|
||||
release="$(curl -sL $trunk/latest | grep -Eo "libcouchbase-[0-9]+\.[0-9]+\.[0-9]+" | head -n 1 | cut -d'-' -f 2)"
|
||||
fi
|
||||
deb_url="$trunk/download/$release/libcouchbase-${release}_ubuntu${DISTRIB_RELEASE/./}_${DISTRIB_CODENAME}_amd64.tar"
|
||||
deb_url="$trunk/download/$release/libcouchbase-${release}_ubuntu${VERSION_ID/./}_${VERSION_CODENAME}_amd64.tar"
|
||||
get -q -n /tmp/libcouchbase.tar "$deb_url"
|
||||
sudo tar -xf /tmp/libcouchbase.tar -C /tmp
|
||||
install_packages libev4 libevent-dev
|
||||
|
@ -1,7 +1,11 @@
|
||||
# Function to setup environment for self-hosted runners.
|
||||
self_hosted_helper() {
|
||||
if ! command -v sudo >/dev/null; then
|
||||
apt-get install -y sudo || add_log "${cross:?}" "sudo" "Could not install sudo"
|
||||
fi
|
||||
if ! command -v apt-fast >/dev/null; then
|
||||
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
||||
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
|
||||
fi
|
||||
install_packages apt-transport-https curl make software-properties-common unzip autoconf automake gcc g++
|
||||
add_ppa ondrej/php
|
||||
@ -270,11 +274,11 @@ debconf_fix="DEBIAN_FRONTEND=noninteractive"
|
||||
apt_install="sudo $debconf_fix apt-fast install -y"
|
||||
scripts="${dist}"/../src/scripts
|
||||
|
||||
. /etc/os-release
|
||||
# shellcheck source=.
|
||||
. "${scripts:?}"/ext/source.sh
|
||||
. "${scripts:?}"/tools/add_tools.sh
|
||||
. "${scripts:?}"/common.sh
|
||||
. /etc/lsb-release
|
||||
read_env
|
||||
self_hosted_setup
|
||||
setup_php
|
||||
|
Loading…
Reference in New Issue
Block a user