mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 05:23:03 +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
|
else
|
||||||
release="$(curl -sL $trunk/latest | grep -Eo "libcouchbase-[0-9]+\.[0-9]+\.[0-9]+" | head -n 1 | cut -d'-' -f 2)"
|
release="$(curl -sL $trunk/latest | grep -Eo "libcouchbase-[0-9]+\.[0-9]+\.[0-9]+" | head -n 1 | cut -d'-' -f 2)"
|
||||||
fi
|
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"
|
get -q -n /tmp/libcouchbase.tar "$deb_url"
|
||||||
sudo tar -xf /tmp/libcouchbase.tar -C /tmp
|
sudo tar -xf /tmp/libcouchbase.tar -C /tmp
|
||||||
install_packages libev4 libevent-dev
|
install_packages libev4 libevent-dev
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
# Function to setup environment for self-hosted runners.
|
# Function to setup environment for self-hosted runners.
|
||||||
self_hosted_helper() {
|
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
|
if ! command -v apt-fast >/dev/null; then
|
||||||
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
||||||
|
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
|
||||||
fi
|
fi
|
||||||
install_packages apt-transport-https curl make software-properties-common unzip autoconf automake gcc g++
|
install_packages apt-transport-https curl make software-properties-common unzip autoconf automake gcc g++
|
||||||
add_ppa ondrej/php
|
add_ppa ondrej/php
|
||||||
@ -270,11 +274,11 @@ debconf_fix="DEBIAN_FRONTEND=noninteractive"
|
|||||||
apt_install="sudo $debconf_fix apt-fast install -y"
|
apt_install="sudo $debconf_fix apt-fast install -y"
|
||||||
scripts="${dist}"/../src/scripts
|
scripts="${dist}"/../src/scripts
|
||||||
|
|
||||||
|
. /etc/os-release
|
||||||
# shellcheck source=.
|
# shellcheck source=.
|
||||||
. "${scripts:?}"/ext/source.sh
|
. "${scripts:?}"/ext/source.sh
|
||||||
. "${scripts:?}"/tools/add_tools.sh
|
. "${scripts:?}"/tools/add_tools.sh
|
||||||
. "${scripts:?}"/common.sh
|
. "${scripts:?}"/common.sh
|
||||||
. /etc/lsb-release
|
|
||||||
read_env
|
read_env
|
||||||
self_hosted_setup
|
self_hosted_setup
|
||||||
setup_php
|
setup_php
|
||||||
|
Loading…
Reference in New Issue
Block a user