-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy.psdeploy.ps1
47 lines (40 loc) · 1.1 KB
/
deploy.psdeploy.ps1
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
# 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
# find a folder that has psd1 of same name...
if ($ENV:BHProjectName -and $ENV:BHProjectName.Count -eq 1)
{
Deploy Module {
By PSGalleryModule {
FromSource $ENV:BHProjectName
To PSGallery
Tagged Production
WithOptions @{
ApiKey = $ENV:NuGetApiKey
}
}
}
if (
$env:BHProjectName -and $ENV:BHProjectName.Count -eq 1 -and
$env:BHBuildSystem -eq 'AppVeyor'
)
{
Deploy DeveloperBuild {
By AppVeyorModule {
FromSource $ENV:BHProjectName
To AppVeyor
Tagged Development
WithOptions @{
Version = $env:APPVEYOR_BUILD_VERSION
}
}
}
}
}