Skip to content

Commit 11cfd9e

Browse files
authored
Add mono package to ubuntu 22 (#5950)
1 parent d746320 commit 11cfd9e

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ function Get-MsbuildVersion {
8888
return "MSBuild $msbuildVersion (from $msbuildPath)"
8989
}
9090

91+
function Get-NuGetVersion {
92+
$nugetVersion = nuget help | Select-Object -First 1 | Take-OutputPart -Part 2
93+
return "NuGet $nugetVersion"
94+
}
95+
9196
function Get-NodeVersion {
9297
$nodeVersion = $(node --version).Substring(1)
9398
return "Node $nodeVersion"

images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ $runtimesList = @(
4242
(Get-DashVersion),
4343
(Get-CPPVersions),
4444
(Get-FortranVersions),
45+
(Get-MsbuildVersion),
46+
(Get-MonoVersion),
4547
(Get-NodeVersion),
4648
(Get-PerlVersion),
4749
(Get-PythonVersion),
@@ -56,8 +58,6 @@ $runtimesList = @(
5658

5759
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
5860
$runtimesList += @(
59-
(Get-MsbuildVersion),
60-
(Get-MonoVersion),
6161
(Get-ErlangVersion),
6262
(Get-ErlangRebar3Version),
6363
(Get-SwiftVersion)
@@ -73,6 +73,7 @@ $packageManagementList = @(
7373
(Get-CpanVersion),
7474
(Get-GemVersion),
7575
(Get-MinicondaVersion),
76+
(Get-NuGetVersion),
7677
(Get-HelmVersion),
7778
(Get-NpmVersion),
7879
(Get-YarnVersion),

images/linux/scripts/installers/mono.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
## Desc: Installs Mono
55
################################################################################
66

7+
source $HELPER_SCRIPTS/os.sh
8+
79
LSB_CODENAME=$(lsb_release -cs)
810

11+
# There are no packages for Ubuntu 22 in the repo, but developers confirmed that packages from Ubuntu 20 should work
12+
if isUbuntu22; then
13+
LSB_CODENAME="focal"
14+
fi
15+
916
# Test to see if the software in question is already installed, if not install it
1017
# wget "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" -O out && sudo apt-key add out && rm out
1118

images/linux/scripts/tests/Tools.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Describe "gfortran" {
168168
}
169169
}
170170

171-
Describe "Mono" -Skip:(Test-IsUbuntu22) {
171+
Describe "Mono" {
172172
It "mono" {
173173
"mono --version" | Should -ReturnZeroExitCode
174174
}

images/linux/ubuntu2204.pkr.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ build {
300300
"${path.root}/scripts/installers/oc.sh",
301301
"${path.root}/scripts/installers/leiningen.sh",
302302
"${path.root}/scripts/installers/miniconda.sh",
303+
"${path.root}/scripts/installers/mono.sh",
303304
"${path.root}/scripts/installers/kotlin.sh",
304305
"${path.root}/scripts/installers/mysql.sh",
305306
"${path.root}/scripts/installers/sqlpackage.sh",

0 commit comments

Comments
 (0)