-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeploy.PSDeploy.ps1
More file actions
53 lines (47 loc) · 1.15 KB
/
Deploy.PSDeploy.ps1
File metadata and controls
53 lines (47 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Generic module deployment.
# This stuff should be moved to psake for a cleaner deployment view
# ASSUMPTIONS:
# folder structure of:
# - RepoFolder
# - This PSDeploy file
# - ModuleName
# - ModuleName.psd1
# Nuget key in $ENV:NugetApiKey
# Set-BuildEnvironment from BuildHelpers module has populated ENV:BHProjectName
# Publish to gallery with a few restrictions
If ($env:BHPSModulePath -and
$env:BHBuildSystem -ne 'Unknown' -and
@('release','devel') -contains $env:BHBranchName) {
Deploy Module {
By PSGalleryModule {
FromSource $ENV:BHPSModulePath
To PSGallery
WithOptions @{
ApiKey = $ENV:NugetApiKey
}
}
}
} Else {
"Skipping deployment: To deploy, ensure that...`n",
"`t* You are in a known build system (Current: $ENV:BHBuildSystem)`n",
"`t* You are committing to the release/devel branch (Current: $ENV:BHBranchName) `n" |
Write-Output
}
<#
# Publish to AppVeyor if we're in AppVeyor
if(
$env:BHPSModulePath -and
$env:BHBuildSystem -eq 'AppVeyor'
)
{
Deploy DeveloperBuild {
By AppVeyorModule {
FromSource $ENV:BHPSModulePath
To AppVeyor
WithOptions @{
Version = $env:APPVEYOR_BUILD_VERSION
}
}
}
}
#>