-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpsake.build.ps1
106 lines (71 loc) · 2.78 KB
/
psake.build.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
Param(
[Parameter(Position=1,Mandatory=0)]
[string[]]$task_list = @(),
[Parameter()]
[string]$packageVersion = $null,
[Parameter()]
[string]$preReleaseNumber = $null,
[Parameter()]
[string]$configuration = "Release",
[Parameter()]
[bool]$autoIncrementVersion = $false,
[Parameter()]
[bool]$updateVersion = $false,
[Parameter()]
[bool]$updateNuspecFile = $true,
[Parameter()]
[bool]$updateNuspecVersion = $true,
[Parameter()]
[string]$nugetAPIKey = $null
)
$build_file = 'psake.default.ps1'
# Properties for the psake build script
$properties = @{
# Build configuration to use
"configuration" = $configuration;
# Version number to use if running the Publish build task.
# This will be read from the command line args
"packageVersion" = $packageVersion;
# Is the Nuget package a pre-release version?
"preReleaseNumber" = $preReleaseNumber;
# Do we want to auto increment the version (if a prerelease it will increment prerelease otherwise it will increment build number)
"autoIncrementVersion" = $autoIncrementVersion;
# Path to the solution file
"solution" = 'Xam.Plugins.VideoPlayer.sln';
# Base namespeace for the package (used for updating nuspec details)
"baseNamespace" = 'Xam.Plugins.VideoPlayer';
# Folder containing source code
"source_folder" = '.\source';
# Folder container unit tests
"test_folder" = '.\tests';
# Folder to output deployable packages to. This folder should be ignored
# from any source control, as we dont commit build artifacts to source
# control
"deploy_folder" = '.\artifacts\packages';
# Folder that contains nuget files (nuget.exe, nuget.config)
"nuget_folder" = '.\.nuget';
# Folder that contains nuspec files
"nuspec_folder" = '.\.nuget\definitions';
# Folder that contains nuspec files
"nuproj_folder" = '.\.nuget\source';
# List of projects to use when building NuGet Packages (Note: Not used for XLabs)
"projects" = @(
);
# Unit Test Framework (nunit, xunit)
"unittest_framework" = 'nunit';
# Update the version numbers automatically
"updateVersion" = $updateVersion;
"updateNuspecVersion" = $updateNuspecVersion;
"updateNuspecFile" = $updateNuspecFile;
# The name or ip address of the Mac that is running the Xamarin build agent
"macAgentServerAddress" = $null;
# The user name to use to authentice for the Xamarin build agent
"macAgentUser" = $null;
"nugetServerUrl" = 'https://nuget.org';
"nugetAPIKey" = $null;
}
#if (!(Get-Module -Name psake -ListAvailable)) { Install-Module -Name psake -Scope CurrentUser }
#import-module .\packages\psake.4.4.2\tools\psake.psm1
import-module C:\ProgramData\chocolatey\lib\psake\tools\psake.psm1
invoke-psake $build_file $task_list -Properties $properties -Framework "4.6"
Write-Host "Done..."