Merge pull request #417 from dmilov/topic/dmilov/ssoadmin-externaldomain
Implement prepare for publishing funcitonality
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -49,3 +49,4 @@ $RECYCLE.BIN/
|
|||||||
Network Trash Folder
|
Network Trash Folder
|
||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
|
/Modules/VMware.vSphere.SsoAdmin/ForPSGallery/VMware.vSphere.SsoAdmin
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
# **************************************************************************
|
# **************************************************************************
|
||||||
|
|
||||||
param(
|
param(
|
||||||
[ValidateSet("Debug", "Release")]
|
|
||||||
[string]
|
|
||||||
$Configuration = "Release",
|
|
||||||
|
|
||||||
[string]
|
[string]
|
||||||
$TestVc,
|
$TestVc,
|
||||||
|
|
||||||
@@ -14,9 +10,14 @@ param(
|
|||||||
$TestVcUser,
|
$TestVcUser,
|
||||||
|
|
||||||
[string]
|
[string]
|
||||||
$TestVcPassword
|
$TestVcPassword,
|
||||||
|
|
||||||
|
[switch]
|
||||||
|
$PrepareForPSGallery
|
||||||
)
|
)
|
||||||
|
|
||||||
|
$Configuration = "Release"
|
||||||
|
|
||||||
function Test-BuildToolsAreAvailable {
|
function Test-BuildToolsAreAvailable {
|
||||||
$dotnetSdk = Get-Command 'dotnet'
|
$dotnetSdk = Get-Command 'dotnet'
|
||||||
if (-not $dotnetSdk) {
|
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
|
# 1. Test Build Tools
|
||||||
LogInfo "Test build tools are available"
|
LogInfo "Test build tools are available"
|
||||||
Test-BuildToolsAreAvailable
|
Test-BuildToolsAreAvailable
|
||||||
@@ -145,3 +165,8 @@ Publish $OutputFolder
|
|||||||
|
|
||||||
# 4. Test
|
# 4. Test
|
||||||
Test
|
Test
|
||||||
|
|
||||||
|
# 5. Prepare For Release
|
||||||
|
if ($PrepareForPSGallery) {
|
||||||
|
PrepareForRelease
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user