Add PPA repository for Firefox as default (#6528)

This commit is contained in:
Alexey-Ayupov
2022-11-26 13:47:48 +01:00
committed by GitHub
parent 439d09333d
commit 5dd62e7a08
5 changed files with 18 additions and 11 deletions

View File

@@ -10,7 +10,8 @@ function Get-ChromeDriverVersion {
function Get-FirefoxVersion {
$firefoxVersion = firefox --version
return $firefoxVersion
$aptSourceRepo = Get-AptSourceRepository -PackageName "mozillateam"
return "$firefoxVersion (apt source repository: $aptSourceRepo)"
}
function Get-GeckodriverVersion {

View File

@@ -246,16 +246,11 @@ $browsersAndDriversList = @(
(Get-ChromiumVersion),
(Get-EdgeVersion),
(Get-EdgeDriverVersion),
(Get-SeleniumVersion)
(Get-SeleniumVersion),
(Get-FirefoxVersion),
(Get-GeckodriverVersion)
)
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
$browsersAndDriversList += @(
(Get-FirefoxVersion),
(Get-GeckodriverVersion)
)
}
$markdown += New-MDList -Style Unordered -Lines $browsersAndDriversList
$markdown += New-MDHeader "Environment variables" -Level 4
$markdown += Build-BrowserWebdriversEnvironmentTable | New-MDTable

View File

@@ -7,8 +7,18 @@
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
FIREFOX_REPO="ppa:mozillateam/ppa"
# Install Firefox
apt-get install -y firefox
add-apt-repository $FIREFOX_REPO -y
apt-get update
apt-get install --target-release 'o=LP-PPA-mozillateam' -y firefox
# Remove source repo's
add-apt-repository --remove $FIREFOX_REPO
# Document apt source repo's
echo "mozillateam $FIREFOX_REPO" >> $HELPER_SCRIPTS/apt-sources.txt
# add to gloabl system preferences for firefox locale en_US, because other browsers have en_US local.
# Default firefox local is en_GB

View File

@@ -1,4 +1,4 @@
Describe "Firefox" -Skip:(Test-IsUbuntu22) {
Describe "Firefox" {
It "Firefox" {
"sudo -i firefox --version" | Should -ReturnZeroExitCode
}

View File

@@ -287,6 +287,7 @@ build {
"${path.root}/scripts/installers/codeql-bundle.sh",
"${path.root}/scripts/installers/containers.sh",
"${path.root}/scripts/installers/dotnetcore-sdk.sh",
"${path.root}/scripts/installers/firefox.sh",
"${path.root}/scripts/installers/microsoft-edge.sh",
"${path.root}/scripts/installers/gcc.sh",
"${path.root}/scripts/installers/gfortran.sh",