Merge pull request #417 from dmilov/topic/dmilov/ssoadmin-externaldomain
Implement prepare for publishing funcitonality
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -48,4 +48,5 @@ $RECYCLE.BIN/
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
.apdisk
|
||||
/Modules/VMware.vSphere.SsoAdmin/ForPSGallery/VMware.vSphere.SsoAdmin
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
# **************************************************************************
|
||||
|
||||
param(
|
||||
[ValidateSet("Debug", "Release")]
|
||||
[string]
|
||||
$Configuration = "Release",
|
||||
|
||||
[string]
|
||||
$TestVc,
|
||||
|
||||
@@ -14,9 +10,14 @@ param(
|
||||
$TestVcUser,
|
||||
|
||||
[string]
|
||||
$TestVcPassword
|
||||
$TestVcPassword,
|
||||
|
||||
[switch]
|
||||
$PrepareForPSGallery
|
||||
)
|
||||
|
||||
$Configuration = "Release"
|
||||
|
||||
function Test-BuildToolsAreAvailable {
|
||||
$dotnetSdk = Get-Command 'dotnet'
|
||||
if (-not $dotnetSdk) {
|
||||
@@ -130,6 +131,25 @@ function Test {
|
||||
}
|
||||
}
|
||||
|
||||
function PrepareForRelease {
|
||||
$targetRootDirName = 'ForPSGallery'
|
||||
$releaseDir = Join-Path (Split-Path $PSScriptRoot) $targetRootDirName
|
||||
if (Test-Path $releaseDir) {
|
||||
Remove-Item -Path $releaseDir -Recurse
|
||||
}
|
||||
|
||||
New-Item -Path $releaseDir -ItemType Directory | Out-Null
|
||||
$releaseDir = Join-Path $releaseDir 'VMware.vSphere.SsoAdmin'
|
||||
New-Item -Path $releaseDir -ItemType Directory | Out-Null
|
||||
|
||||
$sourceDir = Split-Path $PSScriptRoot
|
||||
Get-ChildItem -Path $sourceDir -Exclude src, README.md, $targetRootDirName | `
|
||||
Copy-Item -Recurse -Destination $releaseDir
|
||||
|
||||
$catalogFilePath = Join-path $releaseDir ((Get-Item $releaseDir).Name + ".cat")
|
||||
New-FileCatalog -Path $releaseDir -CatalogFilePath $catalogFilePath | Out-Null
|
||||
}
|
||||
|
||||
# 1. Test Build Tools
|
||||
LogInfo "Test build tools are available"
|
||||
Test-BuildToolsAreAvailable
|
||||
@@ -144,4 +164,9 @@ LogInfo "Publish binaries to '$OutputFolder'"
|
||||
Publish $OutputFolder
|
||||
|
||||
# 4. Test
|
||||
Test
|
||||
Test
|
||||
|
||||
# 5. Prepare For Release
|
||||
if ($PrepareForPSGallery) {
|
||||
PrepareForRelease
|
||||
}
|
||||
Reference in New Issue
Block a user