mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 04:37:09 +00:00
[macOS] Rename build scripts (#8887)
Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
################################################################################
|
||||
## File: toolset.ps1
|
||||
## File: Install-Toolset.ps1
|
||||
## Team: CI-Build
|
||||
## Desc: Install toolset
|
||||
################################################################################
|
||||
Import-Module "~/image-generation/helpers/Tests.Helpers.psm1"
|
||||
|
||||
Import-Module "~/image-generation/tests/Helpers.psm1"
|
||||
Import-Module "~/image-generation/helpers/Common.Helpers.psm1"
|
||||
|
||||
Function Install-Asset {
|
||||
@@ -55,4 +56,4 @@ foreach ($tool in $tools) {
|
||||
}
|
||||
}
|
||||
|
||||
Invoke-PesterTests "Toolcache"
|
||||
Invoke-PesterTests "Toolcache"
|
||||
@@ -1,3 +1,8 @@
|
||||
################################################################################
|
||||
## File: Install-Xcode.ps1
|
||||
## Desc: Install Xcode
|
||||
################################################################################
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module "$env:HOME/image-generation/helpers/Common.Helpers.psm1"
|
||||
@@ -1,3 +1,8 @@
|
||||
################################################################################
|
||||
## File: Update-XcodeSimulators.ps1
|
||||
## Desc: Check available Xcode simulators and create missing ones
|
||||
################################################################################
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module "$env:HOME/image-generation/helpers/Xcode.Helpers.psm1" -DisableNameChecking
|
||||
@@ -48,4 +53,4 @@ Get-XcodeInfoList | Out-Null
|
||||
Write-Host "Validating and fixing Xcode simulators..."
|
||||
Get-BrokenXcodeSimulatorsList | ForEach-Object {
|
||||
Ensure-SimulatorInstalled -RuntimeId $_.RuntimeId -DeviceId $_.DeviceId -SimulatorName $_.SimulatorName -XcodeVersion $_.XcodeVersion
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
brew_smart_install httpd
|
||||
sudo sed -Ei '' 's/Listen .*/Listen 80/' $(brew --prefix)/etc/httpd/httpd.conf
|
||||
|
||||
invoke_tests "WebServers" "Apache"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing bicep cli...
|
||||
brew tap azure/bicep
|
||||
brew_smart_install bicep
|
||||
|
||||
invoke_tests "Common" "Bicep"
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
###########################################################################
|
||||
# The script removes local Homebrew cache
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
rm -rf "$(brew --cache)"
|
||||
@@ -1,8 +1,11 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-auto-updates.sh
|
||||
## Desc: Disabling automatic updates
|
||||
################################################################################
|
||||
|
||||
# Disabling automatic updates
|
||||
sudo softwareupdate --schedule off
|
||||
defaults write com.apple.SoftwareUpdate AutomaticDownload -int 0
|
||||
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 0
|
||||
defaults write com.apple.commerce AutoUpdate -bool false
|
||||
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false
|
||||
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false
|
||||
@@ -1,7 +1,10 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/autologin.sh
|
||||
# Distributed by MIT license, license can be found at the bottom of this script
|
||||
################################################################################
|
||||
## File: configure-autologin.sh
|
||||
## Desc: add a Daemon to re-detect the attached network interfaces after vm is booted.
|
||||
## Maintainer: @timsutton
|
||||
## script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/autologin.sh
|
||||
################################################################################
|
||||
|
||||
echo "Enabling automatic GUI login for the '$USERNAME' user.."
|
||||
|
||||
@@ -15,4 +18,4 @@ Copyright (c) 2013-2017 Timothy Sutton
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
'
|
||||
'
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-hostname.sh
|
||||
## Desc: Change the hostname at startup to prevent duplicates
|
||||
## Hostname and Computername should contain .local in name to avoid name resolution issues
|
||||
################################################################################
|
||||
|
||||
# Add script for changing hostname to run on startup to prevent duplicate hostnames across the environment. Hostname and Computername should contain .local in name to avoid name resolution issues
|
||||
tee -a /usr/local/bin/change_hostname.sh > /dev/null <<\EOF
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
@@ -25,4 +29,4 @@ sudo tee -a /Library/LaunchDaemons/change_hostname.plist > /dev/null <<\EOF
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
EOF
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-machine.sh
|
||||
## Desc: Configure guest OS settings
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-max-files-limitation.sh
|
||||
## Desc: Configure max files limitation
|
||||
################################################################################
|
||||
|
||||
Launch_Daemons="/Library/LaunchDaemons"
|
||||
|
||||
@@ -39,4 +43,3 @@ chmod 0644 "${Launch_Daemons}/limit.maxfiles.plist"
|
||||
|
||||
|
||||
echo "Done, limit.maxfiles has been updated"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-network-interface-detection.sh
|
||||
## Desc: add a Daemon to re-detect the attached network interfaces after vm is booted.
|
||||
## Maintainer: @timsutton
|
||||
## script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/add-network-interface-detection.sh
|
||||
################################################################################
|
||||
|
||||
# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/add-network-interface-detection.sh
|
||||
# Distributed by MIT license, license can be found at the bottom of this script
|
||||
|
||||
# This script adds a Mac OS Launch Daemon, which runs every time the
|
||||
# machine is booted. The daemon will re-detect the attached network
|
||||
# interfaces. If this is not done, network devices may not work.
|
||||
PLIST=/Library/LaunchDaemons/sonoma.detectnewhardware.plist
|
||||
cat <<EOF > "${PLIST}"
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@@ -37,4 +37,4 @@ Copyright (c) 2013-2017 Timothy Sutton
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
'
|
||||
'
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-ntpconf.sh
|
||||
## Desc: Configure NTP servers and set the timezone to UTC
|
||||
################################################################################
|
||||
|
||||
echo Additional NTP servers adding into /etc/ntp.conf file...
|
||||
cat > /etc/ntp.conf << EOF
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-preimagedata.sh
|
||||
## Desc: Configure data used in the image
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-screensaver.sh
|
||||
## Desc: Configure screensaver
|
||||
################################################################################
|
||||
|
||||
# set screensaver idleTime to 0, to prevent turning screensaver on
|
||||
macUUID=`ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-62`
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-shell.sh
|
||||
## Desc: Configure shell to use bash
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
arch=$(get_arch)
|
||||
@@ -11,4 +15,4 @@ sudo chsh -s /bin/bash root
|
||||
if [[ $arch == "arm64" ]]; then
|
||||
echo "Adding Homebrew environment to bash"
|
||||
/opt/homebrew/bin/brew shellenv >> ~/.bashrc
|
||||
fi
|
||||
fi
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-ssh.sh
|
||||
## Desc: Configure ssh
|
||||
################################################################################
|
||||
|
||||
[[ ! -d ~/.ssh ]] && mkdir ~/.ssh 2>/dev/null
|
||||
chmod 777 ~/.ssh
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-system.sh
|
||||
## Desc: Post deployment system configuration actions
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# This script adds permissions, which are required for some installed tools to work properly, to the TCC.db
|
||||
################################################################################
|
||||
## File: configure-tccdb-macos.sh
|
||||
## Desc: Configure permissions to the TCC.db
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-windows.sh
|
||||
## Desc: Close open windows
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
@@ -1,51 +1,40 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# What is this for?
|
||||
# This script fixes an issue appeared for some Xcode users where it would show long identifiers
|
||||
# in the list of simulators instead of usual short names. This is caused by duplicate simulators
|
||||
# being sometimes created after switching between Xcode versions, with the same
|
||||
# device type + runtime pair occurring more than once in your list of available simulators.
|
||||
# Instead of showing the same simulator name twice, Xcode defaults to simulator identifiers.
|
||||
#
|
||||
# What it does?
|
||||
# The script queries Xcode's `simctl` utility for all simulators you have, finds duplicate type + runtime pairs,
|
||||
# and offers you to delete them. After that, Xcode should return to displaying the list of simulators normally.
|
||||
# When searching for duplicates, the script sorts simulators by their creation time to make sure it deletes
|
||||
# the copy that was created more recently.
|
||||
#
|
||||
# License
|
||||
# This script was taken from https://gist.github.com/vlas-voloshin/f9982128200345cd3fb7 and some modifications made
|
||||
# Distributed by MIT license, license can be found at the bottom of this script
|
||||
################################################################################
|
||||
## File: configure-xcode-simulators.rb
|
||||
## Desc: List all simulators, find duplicate type and delete them.
|
||||
## Maintainer: @vlas-voloshin
|
||||
## script was taken from https://gist.github.com/vlas-voloshin/f9982128200345cd3fb7
|
||||
################################################################################
|
||||
|
||||
class SimDevice
|
||||
|
||||
|
||||
attr_accessor :runtime
|
||||
attr_accessor :name
|
||||
attr_accessor :identifier
|
||||
attr_accessor :timestamp
|
||||
|
||||
|
||||
def initialize(runtime, name, identifier, timestamp)
|
||||
@runtime = runtime
|
||||
@name = name
|
||||
@identifier = identifier
|
||||
@timestamp = timestamp
|
||||
end
|
||||
|
||||
|
||||
def to_s
|
||||
return "#{@name} - #{@runtime} (#{@identifier}) [#{@timestamp}]"
|
||||
end
|
||||
|
||||
|
||||
def equivalent_to_device(device)
|
||||
return @runtime == device.runtime && @name == device.name
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
# Executes a shell command and returns the result from stdout
|
||||
def execute_simctl_command(command)
|
||||
return %x[xcrun simctl #{command}]
|
||||
end
|
||||
|
||||
|
||||
# Retrieves the creation date/time of simulator with specified identifier
|
||||
def simulator_creation_date(identifier)
|
||||
directory = Dir.home() + "/Library/Developer/CoreSimulator/Devices/" + identifier
|
||||
@@ -60,14 +49,14 @@ class SimDevice
|
||||
return Time.now
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Deletes specified simulator
|
||||
def delete_device(device)
|
||||
execute_simctl_command("delete #{device.identifier}")
|
||||
end
|
||||
|
||||
|
||||
puts("Searching for simulators...")
|
||||
|
||||
|
||||
# Retrieve the list of existing simulators
|
||||
devices = []
|
||||
runtime = ""
|
||||
@@ -87,10 +76,10 @@ class SimDevice
|
||||
devices.push(device)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Sort the simulators by their creation timestamp, ascending
|
||||
devices = devices.sort { |a, b| a.timestamp <=> b.timestamp }
|
||||
|
||||
|
||||
duplicates = {}
|
||||
# Enumerate all devices except for the last one
|
||||
for i in 0..devices.count-2
|
||||
@@ -106,12 +95,12 @@ class SimDevice
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if duplicates.count == 0
|
||||
puts("You don't have duplicate simulators!")
|
||||
exit()
|
||||
end
|
||||
|
||||
|
||||
puts("Looks like you have #{duplicates.count} duplicate simulator#{duplicates.count > 1 ? "s" : ""}:")
|
||||
duplicates.each_pair do |duplicate, original|
|
||||
puts
|
||||
@@ -120,14 +109,14 @@ class SimDevice
|
||||
puts("#{original}")
|
||||
end
|
||||
puts
|
||||
|
||||
|
||||
puts("Each duplicate was determined as the one created later than the 'original'.")
|
||||
|
||||
|
||||
puts("Deleting...")
|
||||
duplicates.each_key do |duplicate|
|
||||
delete_device(duplicate)
|
||||
end
|
||||
|
||||
|
||||
puts("Done!")
|
||||
|
||||
=begin
|
||||
@@ -152,4 +141,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
=end
|
||||
=end
|
||||
@@ -1,13 +1,12 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-xcode-symlinks.sh
|
||||
## Desc: Link the existing Xcodes into the correct location for provisionator.
|
||||
## This is maintained for backwards compatibility only. Do not add new xcodes here.
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Link the existing Xcodes into the correct location for provisionator.
|
||||
|
||||
# These symlinks are necessary for Xamarin team to make sure that xamarin-provisionator can find them.
|
||||
|
||||
# Old style provisionator directories. This is maintained for
|
||||
# backwards compatibility only. Do not add new xcodes here.
|
||||
ln -sf /Applications/Xcode_8.app /Applications/Xcode8.app
|
||||
ln -sf /Applications/Xcode_8.1.app /Applications/Xcode81.app
|
||||
ln -sf /Applications/Xcode_9.app /Applications/Xcode9.app
|
||||
@@ -17,4 +16,4 @@ ln -sf /Applications/Xcode_9.3.app /Applications/Xcode93.app
|
||||
ln -sf /Applications/Xcode_9.3.app /Applications/Xcode_9.3_beta.app
|
||||
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4-beta.app
|
||||
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta.app
|
||||
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta_2.app
|
||||
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta_2.app
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: configure-xcode.sh
|
||||
## Desc: Configure Xcode after installation
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
XCODE_LIST=($(get_toolset_value '.xcode.versions | reverse | .[].link'))
|
||||
@@ -1,9 +1,7 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
################################################################################
|
||||
## File: action-archive-cache.sh
|
||||
## Desc: Download latest release from https://github.com/actions/action-verions
|
||||
## and un-tar to $HOME/actionarchivecache
|
||||
## File: install-actions-cache.sh
|
||||
## Desc: Download latest release from https://github.com/actions/action-versions
|
||||
## Maintainer: #actions-runtime and @TingluoHuang
|
||||
################################################################################
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-android-sdk.sh
|
||||
## Desc: Install Android SDK, NDK and tools
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
function filter_components_by_version {
|
||||
12
images/macos/scripts/build/install-apache.sh
Normal file
12
images/macos/scripts/build/install-apache.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-apache.sh
|
||||
## Desc: Install Apache HTTP Server
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
brew_smart_install httpd
|
||||
sudo sed -Ei '' 's/Listen .*/Listen 80/' $(brew --prefix)/etc/httpd/httpd.conf
|
||||
|
||||
invoke_tests "WebServers" "Apache"
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-audiodevice.sh
|
||||
## Desc: Install audio device
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "install switchaudio-osx"
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-aws-tools.sh
|
||||
## Desc: Install the AWS CLI, Session Manager plugin for the AWS CLI, and AWS SAM CLI
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing aws...
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-azcopy.sh
|
||||
## Desc: Install AzCopy
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
arch=$(get_arch)
|
||||
|
||||
13
images/macos/scripts/build/install-bicep.sh
Normal file
13
images/macos/scripts/build/install-bicep.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-bicep.sh
|
||||
## Desc: Install bicep cli
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing bicep cli...
|
||||
brew tap azure/bicep
|
||||
brew_smart_install bicep
|
||||
|
||||
invoke_tests "Common" "Bicep"
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-chrome.sh
|
||||
## Desc: Install chrome and chrome for testing browsers
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
arch=$(get_arch)
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-cocoapods.sh
|
||||
## Desc: Install Cocoapods
|
||||
################################################################################
|
||||
|
||||
# Setup the Cocoapods
|
||||
echo "Installing Cocoapods..."
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-codeql-bundle.sh
|
||||
## Desc: Install CodeQL bundle
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Retrieve the CLI version of the latest CodeQL bundle.
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-common-utils.sh
|
||||
## Desc: Install utils listed in toolset file
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Download and install YQ in cases when it is not available in the formulae as for macOS 11: https://formulae.brew.sh/formula/yq
|
||||
@@ -1,11 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-dotnet.sh
|
||||
## Desc: Install dotnet
|
||||
################################################################################
|
||||
|
||||
###########################################################################
|
||||
# The main idea of this script is to automate dotnet installs
|
||||
# Based on:
|
||||
# https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
|
||||
#
|
||||
###########################################################################
|
||||
source ~/utils/utils.sh
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-edge.sh
|
||||
## Desc: Install edge browser
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Microsoft Edge..."
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-firefox.sh
|
||||
## Desc: Install firefox browser
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Firefox..."
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-gcc.sh
|
||||
## Desc: Install GCC
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
gccVersions=$(get_toolset_value '.gcc.versions | .[]')
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-git.sh
|
||||
## Desc: Install Git and Git LFS
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing Git...
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-golang.sh
|
||||
## Desc: Install Go
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
DEFAULT_GO_VERSION=$(get_toolset_value '.go.default')
|
||||
@@ -8,4 +13,4 @@ brew_smart_install "go@${DEFAULT_GO_VERSION}"
|
||||
# Create symlinks to preserve backward compatibility. Symlinks are not created when non-latest go is being installed
|
||||
ln -sf $(brew --prefix go@${DEFAULT_GO_VERSION})/bin/* /usr/local/bin/
|
||||
|
||||
invoke_tests "Common" "Go"
|
||||
invoke_tests "Common" "Go"
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-haskell.sh
|
||||
## Desc: Install Haskell
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-homebrew.sh
|
||||
## Desc: Install Homebrew
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
@@ -36,4 +40,4 @@ echo "Installing wget..."
|
||||
brew_smart_install "wget"
|
||||
|
||||
# init brew bundle feature
|
||||
brew tap Homebrew/bundle
|
||||
brew tap Homebrew/bundle
|
||||
13
images/macos/scripts/build/install-llvm.sh
Normal file
13
images/macos/scripts/build/install-llvm.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-llvm.sh
|
||||
## Desc: Install LLVM
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
llvmVersion=$(get_toolset_value '.llvm.version')
|
||||
|
||||
brew_smart_install "llvm@${llvmVersion}"
|
||||
|
||||
invoke_tests "LLVM"
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-miniconda.sh
|
||||
## Desc: Install Miniconda
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-mongodb.sh
|
||||
## Desc: Install MongoDB
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# MongoDB object-value database
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
################################################################################
|
||||
## File: mono.sh
|
||||
## Desc: Installs Mono Framework
|
||||
## File: install-mono.sh
|
||||
## Desc: Install Mono Framework
|
||||
################################################################################
|
||||
|
||||
# Source utility functions
|
||||
12
images/macos/scripts/build/install-nginx.sh
Normal file
12
images/macos/scripts/build/install-nginx.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-nginx.sh
|
||||
## Desc: Install Nginx
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
brew_smart_install nginx
|
||||
sudo sed -Ei '' 's/listen.*/listen 80;/' $(brew --prefix)/etc/nginx/nginx.conf
|
||||
|
||||
invoke_tests "WebServers" "Nginx"
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-node.sh
|
||||
## Desc: Install Node.js
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
defaultVersion=$(get_toolset_value '.node.default')
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
###########################################################################
|
||||
# The script installs node version manager with node versions 10,12 and 14
|
||||
#
|
||||
###########################################################################
|
||||
################################################################################
|
||||
## File: install-nvm.sh
|
||||
## Desc: Install node version manager
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
[ -n "$API_PAT" ] && authString=(-H "Authorization: token ${API_PAT}")
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-openjdk.sh
|
||||
## Desc: Install openjdk
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
createEnvironmentVariable() {
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-openssl.sh
|
||||
## Desc: Install openssl
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Install openssl@1.1"
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-php.sh
|
||||
## Desc: Install PHP
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing PHP
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-pipx-packages.sh
|
||||
## Desc: Install Pipx Packages
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
export PATH="$PATH:/opt/pipx_bin"
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-postgresql.sh
|
||||
## Desc: Install PostgreSQL
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Fetch PostgreSQL version to install from the toolset
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-powershell.sh
|
||||
## Desc: Install PowerShell
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing PowerShell...
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: pypy.sh
|
||||
## Desc: Installs PyPy
|
||||
## File: install-pypy.sh
|
||||
## Desc: Install PyPy
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-python.sh
|
||||
## Desc: Install Python
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Python Tooling"
|
||||
8
images/macos/scripts/build/install-rosetta.sh
Normal file
8
images/macos/scripts/build/install-rosetta.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-rosetta.sh
|
||||
## Desc: Install Rosetta
|
||||
################################################################################
|
||||
|
||||
echo 'Installing Rosetta'
|
||||
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-ruby.sh
|
||||
## Desc: Install Ruby
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
arch=$(get_arch)
|
||||
@@ -52,4 +57,5 @@ if ! is_Arm64; then
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
invoke_tests "Ruby.$arch"
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-rubygems.sh
|
||||
## Desc: Install RubyGems
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Updating RubyGems...
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-rust.sh
|
||||
## Desc: Install Rust
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing Rustup...
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-safari.sh
|
||||
## Desc: Install Safari browser
|
||||
################################################################################
|
||||
|
||||
echo "Enabling safari driver..."
|
||||
# https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari
|
||||
@@ -13,4 +17,4 @@ safari_plist="$HOME/Library/WebDriver/com.apple.Safari.plist"
|
||||
/usr/libexec/PlistBuddy -c 'delete AllowRemoteAutomation' $safari_plist || true
|
||||
/usr/libexec/PlistBuddy -c 'add AllowRemoteAutomation bool true' $safari_plist
|
||||
|
||||
invoke_tests "Browsers" "Safari"
|
||||
invoke_tests "Browsers" "Safari"
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-swiftlint.sh
|
||||
## Desc: Install SwiftLint
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing Swiftlint...
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-vcpkg.sh
|
||||
## Desc: Install vcpkg
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Set env variable for vcpkg
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-visualstudio.sh
|
||||
## Desc: Install Visual Studio
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/xamarin-utils.sh
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-xamarin.sh
|
||||
## Desc: Install Xamarin
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/xamarin-utils.sh
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-xcode-clt.sh
|
||||
## Desc: Install Xcode Command Line Tools
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
is_clt_installed() {
|
||||
@@ -43,4 +48,4 @@ while ! is_clt_installed; do
|
||||
((retries--))
|
||||
echo "Wait $sleepInterval seconds before the next check for installed Command Line Tools"
|
||||
sleep $sleepInterval
|
||||
done
|
||||
done
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: install-xcode-simulators.sh
|
||||
## Desc: Install Xcode simulators
|
||||
################################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
llvmVersion=$(get_toolset_value '.llvm.version')
|
||||
|
||||
brew_smart_install "llvm@${llvmVersion}"
|
||||
|
||||
invoke_tests "LLVM"
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
brew_smart_install nginx
|
||||
sudo sed -Ei '' 's/listen.*/listen 80;/' $(brew --prefix)/etc/nginx/nginx.conf
|
||||
|
||||
invoke_tests "WebServers" "Nginx"
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
shutdown -r now
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo 'Installing Rosetta'
|
||||
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
|
||||
Reference in New Issue
Block a user