@@ -6,16 +6,18 @@ Properties {
6
6
7
7
$version = " $base_version .$build_number "
8
8
$sem_version = $base_version
9
+ $short_version = Get-ShortenedVersion $sem_version
9
10
if (-not [string ]::IsNullOrEmpty($version_status )) {
10
- $sem_version = " $base_version -$ ( $version_status ) -$build_number "
11
+ $sem_version = " $sem_version -$ ( $version_status ) -$build_number "
12
+ $short_version = " $short_version -$ ( $version_status ) -$build_number "
11
13
}
12
14
$release_notes_version = Get-ShortenedVersion $base_version
13
15
$config = ' Release'
14
- $installer_product_id = [ System.Guid ]::Parse ($git_commit.Hash.SubString (0 , 32 ))
15
- $installer_upgrade_code = [ System.Guid ]::Parse ($git_commit.Hash.SubString (1 , 32 ))
16
+ $installer_product_id = New-Object System.Guid($git_commit.Hash.SubString (0 , 32 ))
17
+ $installer_upgrade_code = New-Object System.Guid($git_commit.Hash.SubString (1 , 32 ))
16
18
17
19
Write-Host " $config Version $sem_version ($version )" - ForegroundColor Yellow
18
-
20
+
19
21
$base_dir = Split-Path $psake.build_script_file
20
22
$src_dir = " $base_dir "
21
23
$tools_dir = " $base_dir \tools"
@@ -31,7 +33,7 @@ Properties {
31
33
$docs_file = " $base_dir \Docs\Api\CSharpDriverDocs.shfbproj"
32
34
$installer_file = " $base_dir \Installer\CSharpDriverInstaller.wixproj"
33
35
$nuspec_file = " $base_dir \mongocsharpdriver.nuspec"
34
- $chm_file = " $artifacts_dir \CSharpDriverDocs-$sem_version .chm"
36
+ $chm_file = " $artifacts_dir \CSharpDriverDocs-$short_version .chm"
35
37
$release_notes_file = " $base_dir \Release Notes\Release Notes v$release_notes_version .md"
36
38
$license_file = " $base_dir \License.txt"
37
39
@@ -107,8 +109,7 @@ Task Docs -precondition { BuildHasBeenRun } {
107
109
108
110
mv " $docs_dir \CSharpDriverDocs.chm" $chm_file
109
111
mv " $docs_dir \Index.html" " $docs_dir \index.html"
110
- Exec { & $zip_tool a " $artifacts_dir \CSharpDriverDocs-$sem_version -html.zip" " $docs_dir \*" }
111
-
112
+ Exec { & $zip_tool a " $artifacts_dir \CSharpDriverDocs-$short_version -html.zip" " $docs_dir \*" }
112
113
RemoveDirectory $docs_dir
113
114
}
114
115
@@ -119,29 +120,19 @@ task Zip -precondition { (BuildHasBeenRun) -and (DocsHasBeenRun) }{
119
120
120
121
mkdir - p $zip_dir | out-null
121
122
122
- mkdir - p $zip_dir \net35 | out-null
123
123
$35_items = @ (" $35_build_dir \MongoDB.Bson.dll" , `
124
124
" $35_build_dir \MongoDB.Bson.pdb" , `
125
125
" $35_build_dir \MongoDB.Bson.xml" , `
126
126
" $35_build_dir \MongoDB.Driver.dll" , `
127
127
" $35_build_dir \MongoDB.Driver.pdb" , `
128
128
" $35_build_dir \MongoDB.Driver.xml" )
129
- cp $35_items " $zip_dir \net35"
130
-
131
- mkdir - p $zip_dir \net40 | out-null
132
- $40_items = @ (" $40_build_dir \MongoDB.Bson.dll" , `
133
- " $40_build_dir \MongoDB.Bson.pdb" , `
134
- " $40_build_dir \MongoDB.Bson.xml" , `
135
- " $40_build_dir \MongoDB.Driver.dll" , `
136
- " $40_build_dir \MongoDB.Driver.pdb" , `
137
- " $40_build_dir \MongoDB.Driver.xml" )
138
- cp $40_items " $zip_dir \net40"
129
+ cp $35_items " $zip_dir "
139
130
140
131
cp $license_file $zip_dir
141
- cp " Release Notes\Release Notes v$release_notes_version .md" " $zip_dir \Release Notes v $release_notes_version .txt"
142
- cp $chm_file $zip_dir
132
+ cp " Release Notes\Release Notes v$release_notes_version .md" " $zip_dir \Release Notes.txt"
133
+ cp $chm_file " $zip_dir \CSharpDriverDocs.chm "
143
134
144
- Exec { & $zip_tool a " $artifacts_dir \CSharpDriver-$sem_version .zip" " $zip_dir \*" }
135
+ Exec { & $zip_tool a " $artifacts_dir \CSharpDriver-$short_version .zip" " $zip_dir \*" }
145
136
146
137
rd $zip_dir - rec - force | out-null
147
138
}
@@ -150,7 +141,7 @@ Task Installer -precondition { (BuildHasBeenRun) -and (DocsHasBeenRun) } {
150
141
$release_notes_relative_path = Get-Item $release_notes_file | Resolve-Path - Relative
151
142
$doc_relative_path = Get-Item $chm_file | Resolve-Path - Relative
152
143
153
- Exec { msbuild " $installer_file " / t:Rebuild / p:Configuration= $config / p:Version= $version / p:SemVersion= $sem_version / p:ProductId= $installer_product_id / p:UpgradeCode= $installer_upgrade_code / p:ReleaseNotes= $release_notes_relative_path / p:License= " License.rtf" / p:Documentation= $doc_relative_path / p:OutputPath= $artifacts_dir }
144
+ Exec { msbuild " $installer_file " / t:Rebuild / p:Configuration= $config / p:Version= $version / p:SemVersion= $short_version / p:ProductId= $installer_product_id / p:UpgradeCode= $installer_upgrade_code / p:ReleaseNotes= $release_notes_relative_path / p:License= " License.rtf" / p:Documentation= $doc_relative_path / p:OutputPath= $artifacts_dir }
154
145
155
146
rm - force $artifacts_dir \* .wixpdb
156
147
}
0 commit comments