15
15
param (
16
16
[Parameter (Mandatory = $false , Position = 0 )]
17
17
[string ] $buildConfig ,
18
- [Parameter (Mandatory = $false , Position = 1 )]
18
+ [Parameter (Mandatory = $false , Position = 1 )]
19
19
[string ] $apiKey ,
20
- [Parameter (Mandatory = $false , Position = 2 )]
21
- [string ] $repository
20
+ [Parameter (Mandatory = $false , Position = 2 )]
21
+ [string ] $repositoryLocation
22
22
)
23
23
24
24
if ([string ]::IsNullOrEmpty($buildConfig ))
25
25
{
26
- Write-Verbose " Setting build configuration to 'Release'"
27
- $buildConfig = ' Release'
26
+ Write-Verbose " Setting build configuration to 'Release'"
27
+ $buildConfig = " Release"
28
28
}
29
29
30
30
if ([string ]::IsNullOrEmpty($repositoryLocation ))
31
31
{
32
- Write-Verbose " Setting repository location to 'https://dtlgalleryint.cloudapp.net/api/v2'"
32
+ Write-Verbose " Setting repository location to 'https://dtlgalleryint.cloudapp.net/api/v2'"
33
33
34
- $repository = ' https://dtlgalleryint.cloudapp.net'
34
+ $repositoryLocation = " https://dtlgalleryint.cloudapp.net/api/v2 "
35
35
}
36
36
37
- $repositoryLocation = ' $repository/api/v2/'
38
- $repositoryPackageLocation = ' $repository/api/v2/package'
39
-
40
37
41
38
$packageFolder = " $PSScriptRoot \..\src\Package"
42
39
@@ -45,7 +42,7 @@ if ($repo -ne $null) {
45
42
$repoName = $repo.Name
46
43
} else {
47
44
$repoName = $ (New-Guid ).ToString()
48
- Register-PSRepository - Name $repoName - SourceLocation $repositoryLocation - PublishLocation $repositoryPackageLocation - InstallationPolicy Trusted
45
+ Register-PSRepository - Name $repoName - SourceLocation $repositoryLocation - PublishLocation $repositoryLocation / package - InstallationPolicy Trusted
49
46
}
50
47
$modulePath = " $packageFolder \$buildConfig \ServiceManagement\Azure"
51
48
# Publish Azure module
@@ -64,10 +61,10 @@ Write-Host "Published AzureRM.Profile module"
64
61
# Publish AzureRM modules
65
62
$resourceManagerModules = Get-ChildItem - Path " $packageFolder \$buildConfig \ResourceManager\AzureResourceManager" - Directory
66
63
foreach ($module in $resourceManagerModules ) {
67
- if ($module -ne " AzureRM.Profile" ) {
68
- $modulePath = $module.FullName
69
- Write-Host " Publishing $module module from $modulePath "
64
+ if ($module -ne " AzureRM.Profile" ) {
65
+ $modulePath = $module.FullName
66
+ Write-Host " Publishing $module module from $modulePath "
70
67
Publish-Module - Path $modulePath - NuGetApiKey $apiKey - Repository $repoName - Tags (" Azure" , " AzureRM" )
71
- Write-Host " Published $module module"
72
- }
73
- }
68
+ Write-Host " Published $module module"
69
+ }
70
+ }
0 commit comments