Recreate nuget.config with a proper feed for macos (#5793)
This commit is contained in:
@@ -82,4 +82,8 @@ PREFERENCES_XAMARIN_DIR="${HOME}/Library/Preferences/Xamarin"
|
|||||||
mkdir -p $PREFERENCES_XAMARIN_DIR
|
mkdir -p $PREFERENCES_XAMARIN_DIR
|
||||||
/usr/libexec/PlistBuddy -c "add :AppleSdkRoot string /Applications/Xcode_${DEFAULT_XCODE_VERSION}.app" $PREFERENCES_XAMARIN_DIR/Settings.plist
|
/usr/libexec/PlistBuddy -c "add :AppleSdkRoot string /Applications/Xcode_${DEFAULT_XCODE_VERSION}.app" $PREFERENCES_XAMARIN_DIR/Settings.plist
|
||||||
|
|
||||||
|
# Temporary workaround to recreate nuget.config file with a correct feed https://github.com/actions/virtual-environments/issues/5768
|
||||||
|
rm -rf $HOME/.config/NuGet/NuGet.Config
|
||||||
|
nuget config
|
||||||
|
|
||||||
invoke_tests "Xamarin"
|
invoke_tests "Xamarin"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ BeforeAll {
|
|||||||
param (
|
param (
|
||||||
[string] $Version
|
[string] $Version
|
||||||
)
|
)
|
||||||
|
|
||||||
$versionParts = $Version.Split(".")
|
$versionParts = $Version.Split(".")
|
||||||
return [String]::Join(".", $versionParts[0..1])
|
return [String]::Join(".", $versionParts[0..1])
|
||||||
}
|
}
|
||||||
@@ -90,28 +90,28 @@ Describe "Xamarin.iOS" {
|
|||||||
|
|
||||||
It "is installed" -TestCases $testCase {
|
It "is installed" -TestCases $testCase {
|
||||||
param ( [string] $VersionFolderPath )
|
param ( [string] $VersionFolderPath )
|
||||||
|
|
||||||
$xamarinBinPath = Join-Path $VersionFolderPath "bin"
|
$xamarinBinPath = Join-Path $VersionFolderPath "bin"
|
||||||
$VersionFolderPath | Should -Exist
|
$VersionFolderPath | Should -Exist
|
||||||
$xamarinBinPath | Should -Exist
|
$xamarinBinPath | Should -Exist
|
||||||
}
|
}
|
||||||
|
|
||||||
It "is available via short link" -TestCases $testCase {
|
It "is available via short link" -TestCases $testCase {
|
||||||
param (
|
param (
|
||||||
[string] $XamarinIosVersion,
|
[string] $XamarinIosVersion,
|
||||||
[string] $IosVersionsPath,
|
[string] $IosVersionsPath,
|
||||||
[string] $VersionFolderPath
|
[string] $VersionFolderPath
|
||||||
)
|
)
|
||||||
|
|
||||||
$shortSymlink = Get-ShortSymlink $XamarinIosVersion # only 'major.minor'
|
$shortSymlink = Get-ShortSymlink $XamarinIosVersion # only 'major.minor'
|
||||||
$shortSymlinkFolderPath = Join-Path $IosVersionsPath $shortSymlink
|
$shortSymlinkFolderPath = Join-Path $IosVersionsPath $shortSymlink
|
||||||
$shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION"
|
$shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION"
|
||||||
$fullVersionPath = Join-Path $VersionFolderPath "VERSION"
|
$fullVersionPath = Join-Path $VersionFolderPath "VERSION"
|
||||||
|
|
||||||
Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath
|
Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Xamarin.Mac" {
|
Describe "Xamarin.Mac" {
|
||||||
@@ -120,7 +120,7 @@ Describe "Xamarin.Mac" {
|
|||||||
$XAMARIN_MAC_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Mac.framework/Versions"
|
$XAMARIN_MAC_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Mac.framework/Versions"
|
||||||
$versionFolderPath = Join-Path $XAMARIN_MAC_VERSIONS_PATH $_
|
$versionFolderPath = Join-Path $XAMARIN_MAC_VERSIONS_PATH $_
|
||||||
$testCase = @{ XamarinMacVersion = $_; VersionFolderPath = $versionFolderPath; MacVersionsPath = $XAMARIN_MAC_VERSIONS_PATH }
|
$testCase = @{ XamarinMacVersion = $_; VersionFolderPath = $versionFolderPath; MacVersionsPath = $XAMARIN_MAC_VERSIONS_PATH }
|
||||||
|
|
||||||
It "is installed" -TestCases $testCase {
|
It "is installed" -TestCases $testCase {
|
||||||
param ( [string] $VersionFolderPath )
|
param ( [string] $VersionFolderPath )
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ Describe "Xamarin.Mac" {
|
|||||||
$VersionFolderPath | Should -Exist
|
$VersionFolderPath | Should -Exist
|
||||||
$xamarinBinPath | Should -Exist
|
$xamarinBinPath | Should -Exist
|
||||||
}
|
}
|
||||||
|
|
||||||
It "is available via short link" -TestCases $testCase {
|
It "is available via short link" -TestCases $testCase {
|
||||||
param (
|
param (
|
||||||
[string] $XamarinMacVersion,
|
[string] $XamarinMacVersion,
|
||||||
@@ -140,7 +140,7 @@ Describe "Xamarin.Mac" {
|
|||||||
$shortSymlinkFolderPath = Join-Path $MacVersionsPath $shortSymlink
|
$shortSymlinkFolderPath = Join-Path $MacVersionsPath $shortSymlink
|
||||||
$shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION"
|
$shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION"
|
||||||
$fullVersionPath = Join-Path $VersionFolderPath "VERSION"
|
$fullVersionPath = Join-Path $VersionFolderPath "VERSION"
|
||||||
|
|
||||||
Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath
|
Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,35 +156,35 @@ Describe "Xamarin.Android" {
|
|||||||
|
|
||||||
It "is installed" -TestCases $testCase {
|
It "is installed" -TestCases $testCase {
|
||||||
param ( [string] $VersionFolderPath )
|
param ( [string] $VersionFolderPath )
|
||||||
|
|
||||||
$xamarinLibPath = Join-Path $VersionFolderPath "lib"
|
$xamarinLibPath = Join-Path $VersionFolderPath "lib"
|
||||||
$xamarinLibPath | Should -Exist
|
$xamarinLibPath | Should -Exist
|
||||||
}
|
}
|
||||||
|
|
||||||
It "is available via short link" -TestCases $testCase {
|
It "is available via short link" -TestCases $testCase {
|
||||||
param (
|
param (
|
||||||
[string] $XamarinAndroidVersion,
|
[string] $XamarinAndroidVersion,
|
||||||
[string] $AndroidVersionsPath,
|
[string] $AndroidVersionsPath,
|
||||||
[string] $VersionFolderPath
|
[string] $VersionFolderPath
|
||||||
)
|
)
|
||||||
|
|
||||||
$shortSymlink = Get-ShortSymlink $XamarinAndroidVersion # only 'major.minor'
|
$shortSymlink = Get-ShortSymlink $XamarinAndroidVersion # only 'major.minor'
|
||||||
$shortSymlinkFolderPath = Join-Path $AndroidVersionsPath $shortSymlink
|
$shortSymlinkFolderPath = Join-Path $AndroidVersionsPath $shortSymlink
|
||||||
$shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION"
|
$shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION"
|
||||||
$fullVersionPath = Join-Path $VersionFolderPath "VERSION"
|
$fullVersionPath = Join-Path $VersionFolderPath "VERSION"
|
||||||
|
|
||||||
Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath
|
Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath
|
||||||
}
|
}
|
||||||
|
|
||||||
It "has correct symlinks" -TestCases $testCase {
|
It "has correct symlinks" -TestCases $testCase {
|
||||||
param ( [string] $VersionFolderPath )
|
param ( [string] $VersionFolderPath )
|
||||||
|
|
||||||
$xamarinLibPath = Join-Path $VersionFolderPath "lib"
|
$xamarinLibPath = Join-Path $VersionFolderPath "lib"
|
||||||
Join-Path $xamarinLibPath "xbuild" | Should -Exist
|
Join-Path $xamarinLibPath "xbuild" | Should -Exist
|
||||||
Join-Path $xamarinLibPath "xbuild-frameworks" | Should -Exist
|
Join-Path $xamarinLibPath "xbuild-frameworks" | Should -Exist
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Xamarin Bundles" {
|
Describe "Xamarin Bundles" {
|
||||||
@@ -194,11 +194,11 @@ Describe "Xamarin Bundles" {
|
|||||||
$XAMARIN_MAC_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Mac.framework/Versions"
|
$XAMARIN_MAC_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Mac.framework/Versions"
|
||||||
$XAMARIN_ANDROID_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Android.framework/Versions"
|
$XAMARIN_ANDROID_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Android.framework/Versions"
|
||||||
}
|
}
|
||||||
|
|
||||||
[array]$XAMARIN_BUNDLES = Get-ToolsetValue "xamarin.bundles"
|
[array]$XAMARIN_BUNDLES = Get-ToolsetValue "xamarin.bundles"
|
||||||
$XAMARIN_DEFAULT_BUNDLE = Get-ToolsetValue "xamarin.bundle-default"
|
$XAMARIN_DEFAULT_BUNDLE = Get-ToolsetValue "xamarin.bundle-default"
|
||||||
If ($XAMARIN_DEFAULT_BUNDLE -eq "latest") { $XAMARIN_DEFAULT_BUNDLE = $XAMARIN_BUNDLES[0].symlink }
|
If ($XAMARIN_DEFAULT_BUNDLE -eq "latest") { $XAMARIN_DEFAULT_BUNDLE = $XAMARIN_BUNDLES[0].symlink }
|
||||||
|
|
||||||
$currentBundle = [PSCustomObject] @{
|
$currentBundle = [PSCustomObject] @{
|
||||||
symlink = "Current"
|
symlink = "Current"
|
||||||
mono = $XAMARIN_DEFAULT_BUNDLE
|
mono = $XAMARIN_DEFAULT_BUNDLE
|
||||||
@@ -220,7 +220,7 @@ Describe "Xamarin Bundles" {
|
|||||||
|
|
||||||
It "Mono symlink <BundleSymlink> exists" -TestCases $allBundles {
|
It "Mono symlink <BundleSymlink> exists" -TestCases $allBundles {
|
||||||
param ( [string] $BundleSymlink )
|
param ( [string] $BundleSymlink )
|
||||||
|
|
||||||
(Join-Path $MONO_VERSIONS_PATH $BundleSymlink) | Should -Exist
|
(Join-Path $MONO_VERSIONS_PATH $BundleSymlink) | Should -Exist
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,4 +290,10 @@ Describe "Xamarin Bundles" {
|
|||||||
|
|
||||||
Validate-IdenticalFileContent -File1 $targetVersionPath -File2 $sourceVersionPath
|
Validate-IdenticalFileContent -File1 $targetVersionPath -File2 $sourceVersionPath
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "Nuget" {
|
||||||
|
It "Nuget config contains nuget.org feed" {
|
||||||
|
Get-Content $env:HOME/.config/NuGet/NuGet.Config | Out-String | Should -Match "nuget.org"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user