mirror of
https://github.com/actions/runner-images.git
synced 2025-12-30 05:49:48 +08:00
Merge branch 'main' of https://github.com/actions/virtual-environments into v-malob/xcode
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo Installing aws...
|
||||
brew install awscli
|
||||
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
|
||||
sudo installer -pkg AWSCLIV2.pkg -target /
|
||||
rm -rf AWSCLIV2.pkg
|
||||
|
||||
echo Installing aws sam cli...
|
||||
brew tap aws/tap
|
||||
|
||||
@@ -8,11 +8,6 @@ export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
|
||||
echo Installing OpenSSL...
|
||||
/usr/local/bin/brew install openssl
|
||||
|
||||
if is_BigSur; then
|
||||
ln -sf $(brew --prefix openssl)/bin/openssl /usr/local/bin/openssl
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Install OpenSSL 1.0.2t
|
||||
# https://www.openssl.org/policies/releasestrat.html - Version 1.0.2 will be supported until 2019-12-31 (LTS)
|
||||
# To preserve backward compatibility with ruby-toolcache
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
## Desc: Install toolset
|
||||
################################################################################
|
||||
|
||||
Import-Module "~/image-generation/helpers/Common.Helpers.psm1"
|
||||
|
||||
Function Get-ToolcacheFromToolset {
|
||||
$toolsetPath = Join-Path $env:HOME "image-generation" "toolset.json"
|
||||
$toolsetJson = Get-Content -Raw $toolsetPath | ConvertFrom-Json
|
||||
@@ -38,7 +40,7 @@ $tools = Get-ToolcacheFromToolset | Where-Object {$ToolsToInstall -contains $_.
|
||||
|
||||
foreach ($tool in $tools) {
|
||||
# Get versions manifest for current tool
|
||||
$assets = Invoke-RestMethod $tool.url
|
||||
$assets = Invoke-RestMethodWithRetry -Url $tool.url
|
||||
|
||||
# Get github release asset for each version
|
||||
foreach ($version in $tool.versions) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
is_clt_installed() {
|
||||
clt_path=`xcode-select -p 2>&1`
|
||||
@@ -10,8 +11,15 @@ install_clt() {
|
||||
# This temporary file prompts the 'softwareupdate' utility to list the Command Line Tools
|
||||
clt_placeholder="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"
|
||||
sudo touch $clt_placeholder
|
||||
# The only working tools for Big Sur are 12.2
|
||||
if is_Less_BigSur; then
|
||||
cltPattern="Command Line Tools"
|
||||
else
|
||||
cltPattern="Command Line Tools.*Xcode-12.2"
|
||||
fi
|
||||
|
||||
clt_label_command="/usr/sbin/softwareupdate -l |
|
||||
grep -B 1 -E 'Command Line Tools' |
|
||||
grep -B 1 -E '${cltPattern}' |
|
||||
awk -F'*' '/^ *\\*/ {print \$2}' |
|
||||
sed -e 's/^ *Label: //' -e 's/^ *//' |
|
||||
sort -V |
|
||||
|
||||
Reference in New Issue
Block a user