forked from andyedinborough/aenetmail
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCreate-Package.ps1
More file actions
23 lines (18 loc) · 805 Bytes
/
Copy pathCreate-Package.ps1
File metadata and controls
23 lines (18 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function create-nuspec() {
$spec = get-text "AE.Net.Mail.nuspec"
$spec = $spec.Replace("#version#", (get-version("bin\release\ae.net.mail.dll")))
$spec = $spec.Replace("#message#", (get-text(".git\COMMIT_EDITMSG")))
$spec | out-file "bin\Package\AE.Net.Mail.nuspec"
}
function get-text($file) {
return [string]::join([environment]::newline, (get-content -path $file))
}
function get-version($file) {
$file = [system.io.path]::combine([environment]::currentdirectory, $file)
return [System.Diagnostics.FileVersionInfo]::GetVersionInfo($file).FileVersion
}
del "bin\Package" -recurse
md "bin\Package\lib\net40"
copy "bin\Release\*.*" "bin\Package\lib\net40"
create-nuspec
.nuget\NuGet.exe pack "bin\Package\AE.Net.Mail.nuspec" /o "bin\Package"