-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.vssbe
620 lines (620 loc) · 24.3 KB
/
.vssbe
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
{
"Header": {
"_": [
" This file for vsSolutionBuildEvent ",
" https://github.com/3F/vsSolutionBuildEvent "
],
"Compatibility": "0.12.4"
},
"PreBuild": [
{
"Enabled": true,
"Name": "Definitions",
"Caption": "Prepares data",
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"FIXME: old scripts and actions need to be reviewed -_-",
"",
"#[$(revDeltaBase = \"2016/11/05\")]",
"#[$(revDeltaMin = $([System.Math]::Pow(10, 3)))]",
"#[$(revDeltaMax = 65534)]",
"",
"~~ Prepares data - version, revBuild & information from git",
"",
"#[var tBase = $([System.DateTime]::Parse('$(revDeltaBase)').ToBinary())]",
"#[var tNow = $([System.DateTime]::UtcNow.Ticks)]",
"#[var revBuild = #[$(",
" [System.TimeSpan]::FromTicks('$(",
" [MSBuild]::Subtract($(tNow), $(tBase))",
" )')",
" .TotalMinutes.ToString('0')",
")]]",
" ",
"#[var revBuild = #[$(",
" [MSBuild]::Add(",
" $(revDeltaMin), ",
" $([MSBuild]::Modulo(",
" $(revBuild), ",
" $([MSBuild]::Subtract(",
" $(revDeltaMax), $(revDeltaMin)",
" ))",
" ))",
" )",
")]]",
"",
"$(incModules = 'inc/modules/')",
"",
"#[var pDir = vsSolutionBuildEvent/]",
"#[var pDirBridge = Bridge/]",
"#[var pDirCIM = CI.MSBuild/]",
"#[var pDirCIGUI = CI.GUI/]",
"#[var pDirDevenv = Devenv\\]",
"#[var pDirProvider = Provider/]",
"#[var pMvsSln = MvsSln/]",
"",
"#[var numSBE = #[File get(\".version\")]]",
"#[var numBridge = #[File get(\"#[var pDirBridge].version\")]]",
"#[var numCIM = #[var numSBE]]",
"#[var numDevenv = #[File get(\"#[var pDirDevenv].version\")]]",
"#[var numProvider = #[File get(\"#[var pDirProvider].version\")]]",
"",
"#[\" the 0 number is reserved for patches from external assemblies /see AssemblyInfo \"]",
"",
"#[var num0Bridge = #[var numBridge].0]",
"#[var num0Devenv = #[var numDevenv].0]",
"#[var num0Provider = #[var numProvider].0]",
"",
"#[var libCore = #[var numSBE]]",
"#[var libCoreInt = $([System.Convert]::ToInt32(\"$(libCore.Replace('.', '0'))\"))]#[\" v0.12.5 -> 1205 \"]",
"",
"#[var vssbeConf = $(Configuration)] L-722",
"#[var cfgSDK = $(vssbeConf.Trim('RELDBGCI_SK'))]",
"",
"",
"#[var tplVersion = // This code was generated by a vsSolutionBuildEvent. ",
"// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.",
"namespace net.r_eg.vsSBE%namespace%",
"{",
" internal struct Version",
" {",
" public static readonly System.Version number = new System.Version(S_NUM_REV);",
"",
" public const string S_NUM = \"%VersionString%\";",
" public const string S_REV = \"%VersionRev%\";",
"",
" public const string S_NUM_REV = S_NUM + \".\" + S_REV;",
"",
" public const string B_SHA1 = \"%bSha1%\";",
" public const string B_NAME = \"%bName%\";",
" public const string B_REVC = \"%bRevCount%\";",
"",
" internal const string S_INFO = S_NUM_REV + \"+\" + B_SHA1;",
" internal const string S_INFO_FULL = S_INFO;",
" }",
"}]"
]
}
},
{
"Enabled": true,
"Name": "ModulesAndPkg",
"Caption": "Submodules and dep packages",
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[$(_tprjs = 'MvsSln;E-MSBuild;LSender;SobaScript;SobaScript.Mapper;SobaScript.Z.Core;SobaScript.Z.Ext;SobaScript.Z.VS;Varhead')]",
"",
"#[$(loop = true)]",
"#[Box iterate(i = 0; $(loop); i += 1): #[try",
"{",
" #[$(_p = \"$(_tprjs.Split(';')[$(i)].Trim())\")]",
" #[try ",
" {",
" #[( $(_p) != \"\" ) ",
" {",
" #[( !(#[IO exists.file(\"$(_p)/$(_p).sln\")]) ) { #[File call(\"git\", \"submodule update --init $(_p)\", 300)] }]",
" }]",
" }",
" catch(err, msg){ #[IO writeLine(STDERR): Cfg .props.user failed: #[$(msg)] ] }]",
"}",
"catch { $(loop = false) }] ]",
"",
"",
"",
"L-660 Your project does not reference \"...\" framework. Add a reference to ...",
"#[File #[($(__p_call)){call}else{scall}]",
"(",
" \".tools\\hmsbuild.bat\",",
" \"-t:restore /v:q /nologo /p:Configuration=$(Configuration) /p:Platform=\\\"Any CPU\\\"\",",
" 300",
")]",
"",
"",
"",
"#[\" Packages \"]",
"",
"#[( !(#[IO exists.file(\"packages/__checked\")]) )",
"{",
" #[IO writeLine(STDOUT): Restoring packages. Please wait ...] ",
"",
" #[NuGet gnt.raw(\"/p:ngconfig=\\\".tools/packages.config\\\" /nologo /v:m /m:6\")]",
" ",
" ",
" #[IO copy.directory(\"\", \"packages/\", true)]",
" #[File write(\"packages/__checked\"): ]",
"}]"
]
}
},
{
"Enabled": true,
"Name": "Version",
"Caption": "Updating version for vsSBE",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[\" ",
" Checking of the git to define sha1, branch name, etc.",
"\"]",
"#[var isGit = #[IO cmd(\"git rev-parse 2>&1\")]]",
"#[( $(isGit) == \"\" )",
"{",
" #[var bSha1 = #[File sout(\"git\", \"rev-parse --short HEAD\")]]",
" #[var bName = #[File sout(\"git\", \"rev-parse --abbrev-ref HEAD\")]]",
" #[var bRevCount = #[File sout(\"git\", \"rev-list HEAD --count\")]]",
" ",
" #[var csVersion = $(tplVersion.Replace(%bName%, \"$(bName)\").Replace(%bSha1%, \"$(bSha1)\").Replace(%bRevCount%, \"$(bRevCount)\"))]",
" ",
" #[($(bName) == \"HEAD\") {",
" #[var bName = $(APPVEYOR_REPO_BRANCH)]",
" }]",
"}",
"else {",
" #[var bSha1 =-] #[var bName =-] #[var bRevCount =-]",
" #[var csVersion = $(tplVersion.Replace(%bName%, \"-\").Replace(%bSha1%, \"-\").Replace(%bRevCount%, \"-\"))]",
"}]",
"",
"",
"#[\"",
" 'vsSolutionBuildEvent' project",
"\"]",
"",
"#[var cs = $(csVersion.Replace(\"%Version%\", \"$(numSBE.Replace('.', ', ')), $(revBuild)\"))]",
"#[var cs = $(cs.Replace(\"%VersionRev%\", \"$(revBuild)\").Replace(\"%VersionString%\", \"$(numSBE)\"))]",
"#[File write(\"#[var pDir]Version.cs\"):#[$(cs.Replace(\"%namespace%\", \"\"))]]",
"#[File write(\"#[var pDirCIM]Version.cs\"):#[$(cs.Replace(\"%namespace%\", \".CI.MSBuild\"))]]",
"",
"",
"#[\"",
" .vsixmanifest",
"\"]",
"",
"#[var vsixvnum = #[var numSBE]]",
"",
"#[( $(IsRCI) ) {",
" #[var numSBE = #[var numSBE].#[var revBuild]]",
" $(fRCI = 'RCI/')",
"}",
"else{ $(fRCI = '') }]",
"",
"#[File replace.Regexp(\"#[var pDir]/sdk10.vsixmanifest\", \"<Version>[0-9.]+</Version>\", \"<Version>#[var vsixvnum]</Version>\")]",
"",
"#[File replace.Regexp(\"#[var pDir]/sdk15.vsixmanifest\", \"(<Identity.*?) Version=\\\"[0-9.]+\\\"\", \"$1 Version=\\\"#[var vsixvnum]\\\"\")]",
"",
"#[File replace.Regexp(\"#[var pDir]/sdk17.vsixmanifest\", \"(<Identity.*?) Version=\\\"[0-9.]+\\\"\", \"$1 Version=\\\"#[var vsixvnum]\\\"\")]",
""
]
}
},
{
"Enabled": true,
"Name": "IncProps",
"Caption": "`.props.user` properties for inc modules",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"",
"#[\" TODO: migrate to .props \"]",
"",
"#[var tplProps =",
"<Project>",
" <PropertyGroup>",
" <Version>$v</Version>",
" </PropertyGroup>",
"</Project>",
"]",
"",
"#[$(_tprjs = 'E-MSBuild;LSender;SobaScript;SobaScript.Mapper;SobaScript.Z.Core;SobaScript.Z.Ext;SobaScript.Z.VS;Varhead')]",
"",
"#[$(loop = true)]",
"#[Box iterate(i = 0; $(loop); i += 1): #[try",
"{",
" #[$(_p = \"$(_tprjs.Split(';')[$(i)].Trim())\")]",
" #[try ",
" {",
" #[( $(_p) != \"\" ) ",
" {",
" #[File write(\"$(incModules)/$(_p)/.props.user\"): #[$(tplProps.Replace('$v', '#[File get(\"$(_p)/.version\")]'))]]",
" }]",
" }",
" catch(err, msg){ #[IO writeLine(STDERR): Cfg .props.user failed: #[$(msg)] ] }]",
"}",
"catch { $(loop = false) }] ]"
]
}
},
{
"Enabled": true,
"Name": "Fvsixmanifest",
"Caption": "source.extension.vsixmanifest",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[IO copy.file(\"$(pDir)/sdk$(cfgSDK).vsixmanifest\", \"$(pDir)/source.extension.vsixmanifest\", true)]",
""
]
}
},
{
"Enabled": true,
"Name": "VerProjects",
"Caption": "Updating version for all subprojects",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[\"",
" for 'Bridge'",
"\"]",
"",
"#[var cs = $(csVersion.Replace(\"%Version%\", \"$(num0Bridge.Replace('.', ', ')), $(revBuild)\").Replace(\"%namespace%\", \".Bridge\"))]",
"#[var cs = $(cs.Replace(\"%VersionRev%\", \"$(revBuild)\").Replace(\"%VersionString%\", \"$(num0Bridge)\"))]",
"#[File write(\"#[var pDirBridge]Version.cs\"):#[var cs]]",
"",
"#[\"",
" for 'Devenv'",
"\"]",
"",
"#[var cs = $(csVersion.Replace(\"%Version%\", \"$(num0Devenv.Replace('.', ', ')), $(revBuild)\").Replace(\"%namespace%\", \".Devenv\"))]",
"#[var cs = $(cs.Replace(\"%VersionRev%\", \"$(revBuild)\").Replace(\"%VersionString%\", \"$(num0Devenv)\"))]",
"#[File write(\"#[var pDirDevenv]Version.cs\"):#[var cs]]",
"",
"#[\"",
" for 'Provider'",
"\"]",
"",
"#[var cs = $(csVersion.Replace(\"%Version%\", \"$(num0Provider.Replace('.', ', ')), $(revBuild)\").Replace(\"%namespace%\", \".Provider\"))]",
"#[var cs = $(cs.Replace(\"%VersionRev%\", \"$(revBuild)\").Replace(\"%VersionString%\", \"$(num0Provider)\"))]",
"#[File write(\"#[var pDirProvider]Version.cs\"):#[var cs]]"
]
}
}
],
"PostBuild": [
{
"Enabled": true,
"Name": "Definitions",
"Caption": "Definitions for POST",
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[var odir = $(SolutionDir)bin/Releases/$(Configuration)/]",
"#[var cfg = #[( $(Configuration) ^= \"REL_\" || $(Configuration) ^= \"RCI_\" ){Release}else{Debug}]]",
"#[var cfgFull = $(Configuration)]",
"#[var CIMLib = $(SolutionDir)bin\\prj\\CIMLib\\Release\\]",
"#[var vsixLib = $(SolutionDir)bin\\prj\\vsSolutionBuildEvent\\$(Configuration)\\]",
"",
"#[var netVerString = $(TargetFrameworkVersion:vsSolutionBuildEvent)]",
"#[var msbuildver = v$(MSBuildToolsVersion)]",
"",
"#[var tplNuspec = #[File get(\".tools/vsSolutionBuildEvent.nuspec\")]]",
"",
"#[IO delete.directory(\"$(odir)\", true)]",
"#[IO copy.directory(\"\", \"$(odir)\", true)]"
]
}
},
{
"Enabled": true,
"Name": "ReleaseNotes",
"Caption": "Release notes",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[var buildInfo = vsSolutionBuildEvent #[var numSBE]+#[var bSha1]",
"",
"",
"Configuration: #[var fRCI]#[var cfgFull] ( #[var cfg] )",
"SDK base: #[var cfgSDK]",
"",
"Sha1: #[var bSha1]",
"",
"Build: #[var revBuild]",
"",
"",
"//////////////////////",
"",
"* Bridge: #[var numBridge]",
"",
"* Provider: #[var numProvider]",
"",
"#[( $(cfgSDK) == 10 ) { ",
"* Devenv plugin: #[var numDevenv]",
"}",
"else {",
"* Devenv plugin: Unavailable for SDK#[$(cfgSDK)]",
"}]",
"",
"",
":: generated by a vsSolutionBuildEvent #[$(vsSolutionBuildEvent)]]",
"",
"#[File writeLine(\"$(odir)\\build.SDK$(cfgSDK).txt\"):#[var buildInfo]]",
"",
"#[var tplNuspec = $(tplNuspec.Replace(\"{build_info}\", \"$(buildInfo)\"))]"
]
}
},
{
"Enabled": true,
"Name": "PackAPI",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"",
"#[$(pBinProvider = \"bin\\prj\\Provider\\$(Configuration)/\")]",
"",
"#[IO copy.file(\"$(odir)\\build.SDK$(cfgSDK).txt\", \"$(pBinProvider)\", true)]",
"",
"#[7z pack.files(",
"{",
" \"$(pBinProvider)Bridge.dll\", ",
" \"$(pBinProvider)Bridge.pdb\",",
" ",
" #[( $(cfg) == \"Release\" ) { ",
" \"$(pBinProvider)Bridge.xml\",",
" \"$(pBinProvider)Provider.xml\",",
" }]",
" ",
" \"$(pBinProvider)Provider.dll\",",
" \"$(pBinProvider)Provider.pdb\",",
" \"$(pBinProvider)build.SDK$(cfgSDK).txt\" ",
" ",
"}, ",
"\"$(odir)vsSBE.API.$(numBridge)+$(bSha1).SDK$(cfgSDK).zip\")]"
]
}
},
{
"Enabled": false,
"Name": "PackCIMSBuild",
"Caption": "Pack 'CI.MSBuild'",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[IO copy.file(\"$(odir)\\build.SDK$(cfgSDK).txt\", \"$(pDirCIM)bin\\$(cfg)\\\\\", true)]",
"#[7z pack.files(",
"{",
" \"$(pDirCIM)bin\\$(cfg)\\Bridge.dll\", ",
" \"$(pDirCIM)bin\\$(cfg)\\Bridge.pdb\",",
" \"$(pDirCIM)bin\\$(cfg)\\Provider.dll\",",
" \"$(pDirCIM)bin\\$(cfg)\\Provider.pdb\",",
" ",
" #[( $(cfg) == \"Release\" ) { ",
" \"$(pDirCIM)bin\\$(cfg)\\Bridge.xml\",",
" \"$(pDirCIM)bin\\$(cfg)\\Provider.xml\",",
" \"$(pDirCIM)bin\\$(cfg)\\CI.MSBuild.xml\",",
" }]",
" ",
" \"$(pDirCIM)bin\\$(cfg)\\CI.MSBuild.dll\",",
" \"$(pDirCIM)bin\\$(cfg)\\CI.MSBuild.pdb\",",
" \"$(pDirCIM)bin\\$(cfg)\\build.SDK$(cfgSDK).txt\"",
"},",
"\"$(odir)CI.MSBuild.$(numCIM)+$(bSha1).SDK$(cfgSDK).zip\")]"
]
}
},
{
"Enabled": true,
"Name": "PackDevenv",
"Caption": "Pack 'Devenv'",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[( $(cfgSDK) == 10 )",
"{",
" #[var _DP = $(SolutionDir)bin\\prj\\Devenv\\$(Configuration)\\]",
" ",
" #[IO delete.directory(\"$(_DP)Devenv\", true)]",
" #[IO copy.directory(\"\", \"$(_DP)Devenv\", true)]",
" ",
" #[IO copy.file({",
" \"$(_DP)Bridge.*\",",
" \"$(_DP)Provider.*\",",
" \"$(_DP)Devenv.*\"",
" },",
" \"$(_DP)Devenv\\\\\", true, {\"Devenv.AddIn\"})]",
" ",
" #[( #[IO exists.file(\"$(_DP)Extensibility.dll\")] ) {",
" #[IO copy.file(\"$(_DP)Extensibility.dll\", \"$(_DP)\\Devenv\\\\\", true)]",
" }]",
" ",
" #[IO copy.file(\"$(odir)\\build.SDK$(cfgSDK).txt\", \"$(_DP)Devenv\\\\\", true)]",
" #[7z pack.files({\"$(_DP)Devenv.AddIn\", \"$(_DP)Devenv\\*.*\"}, \"$(odir)Devenv.$(numDevenv)+$(bSha1).SDK$(cfgSDK).zip\")]",
" ",
"}]"
]
}
},
{
"Enabled": true,
"Name": "PackVSSBE",
"Caption": "Pack 'vsSBE'",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[IO copy.file(",
" \"$(vsixLib)vsSolutionBuildEvent.vsix\", ",
" \"$(odir)vsSolutionBuildEvent.$(vsixvnum)+$(bSha1).SDK$(cfgSDK).vsix\", ",
" true)]"
]
}
},
{
"Enabled": false,
"Name": "VerCIMPrompt",
"Caption": "Gets next number for package from official nuget server",
"IgnoreIfBuildFailed": true,
"Confirmation": true,
"ToConfiguration": [
"REL_SDK10|Any CPU",
"REL_SDK15|Any CPU"
],
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[($(Configuration) ^= \"REL_\" && !$(Configuration) ^= \"CI_\") {",
" #[var numCIMPackage = $([MSBuild]::Add(#[File sout(\"cmd\", \"/C .nuget\\nuget.exe list vsSBE.CI.MSBuild | grep 'vsSBE.CI.MSBuild' | sed -r 's/^.*\\s[0-9]+\\.[0-9]+\\.//'\")], 1))]",
"}",
"else{",
" #[var numCIMPackage = 0]",
"}]"
]
}
},
{
"Enabled": true,
"Name": "NuGetCIM",
"Caption": "NuGet pack - CI.MSBuild",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[var nupCIMdir = $(odir)NuGet-CI.MSBuild-package]",
"",
"#[IO delete.directory(\"$(nupCIMdir)\", true)]",
"#[IO copy.directory(\"\", \"$(nupCIMdir)\", true)]",
"",
"#[$(obinNupkg = \"$(nupCIMdir)\\tools\\\\\")]",
"",
"#[var nuspec = $(tplNuspec.Replace(\"%CIM%\", \"$(vsixvnum)\").Replace(\"%vsSBE%\", \"$(numSBE)\"))]",
"#[File write(\"$(nupCIMdir)\\vsSolutionBuildEvent.nuspec\"):#[var nuspec]]",
"",
"#[\" files for package \"]",
"",
"#[IO copy.file(\"$(CIMLib)\\*.dll\", \"$(obinNupkg)\", true)]#[\" CIMLib custom \"]",
"",
"#[var ciml = $(SolutionDir)bin\\prj\\CI.MSBuild\\$(Configuration)\\]",
"#[var cimgui = $(SolutionDir)bin\\prj\\CI.GUI\\$(Configuration)\\]",
"",
"#[\" vsix dir \"]",
"#[IO copy.file({",
" \"$(vsixLib)*.dll\",",
" \"$(ciml)/*.dll\",",
" \"$(cimgui)/*.exe\",",
" \"$(odir)\\build.SDK$(cfgSDK).txt\",",
" \"3rd-party\",",
" \"changelog.txt\",",
" \"LICENSE\",",
" \"$(vsixLib)*.pkgdef\",",
" \"$(vsixLib)*.config\",",
" \"$(vsixLib)*.vsixmanifest\",",
" \"$(ciml)/*.bat\",",
" \"$(ciml)/*.cmd\"",
" },",
" \"$(obinNupkg)\", true, {\"cim.cmd\"})]",
"",
"#[IO copy.file({\"$(vsixLib)\\x64\\\\7z.dll\"}, \"$(obinNupkg)x64\\\\\", true)]",
"#[IO copy.file({",
" \"$(pDir)\\Resources\\\\Package.png\", ",
" \"$(pDir)\\Resources\\\\License.md\"",
" }, ",
" \"$(obinNupkg)Resources\\\\\", true)]",
"",
"#[IO copy.file(\"LICENSE\", \"$(nupCIMdir)\\\\License.txt\", true)]",
"#[IO copy.file({\"README.md\", \"$(ciml)/*.cmd\", \"$(cimgui)/GUI.bat\"}, \"$(nupCIMdir)\", true, {\"netfx4sdk.cmd\"} )]",
"",
"",
"#[\" xml doc \"]",
"#[( $(cfg) == \"Release\" )",
"{",
" #[IO copy.file({",
" \"$(ciml)/Bridge.xml\",",
" \"$(ciml)/Provider.xml\",",
" \"$(ciml)/CI.MSBuild.xml\",",
" \"$(vsixLib)vsSolutionBuildEvent.xml\"",
" }, ",
" \"$(obinNupkg)\", true)]",
"}]",
"",
"#[NuGet gnt.raw(\"gnt.core /t:pack /p:ngin=\\\"$(nupCIMdir)\\\" /p:ngout=\\\"$(odir)\\\"\")]",
"#[IO delete.directory(\"$(nupCIMdir)\", true)]",
"",
"#[IO copy.file(\"$(odir)\\vsSolutionBuildEvent.$(vsixvnum).nupkg\", \"$(odir)\\vsSolutionBuildEvent.$(vsixvnum)+$(bSha1).SDK$(cfgSDK).nupkg\", true)]",
"#[IO delete.files({\"$(odir)\\vsSolutionBuildEvent.$(vsixvnum).nupkg\"})]"
]
}
},
{
"Enabled": true,
"Name": "PackClientDemo",
"Caption": "Pack 'ClientDemo'",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[var clientDemoDir = bin\\prj\\ClientDemo\\$(Configuration)\\]",
"#[7z pack.files({",
" \"$(clientDemoDir)Bridge.dll\", ",
" \"$(clientDemoDir)Bridge.pdb\",",
" \"$(clientDemoDir)client.vssbe.dll\",",
" \"$(clientDemoDir)client.vssbe.pdb\"}, \"$(odir)ClientDemo.$(bSha1).SDK$(cfgSDK).zip\")]"
]
}
},
{
"Enabled": true,
"Name": "GetterCIM",
"Caption": "Generate getter of CIM package",
"IgnoreIfBuildFailed": true,
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command__": [
"#[$(getcimName = 'vsSolutionBuildEvent.$(vsixvnum).bat')]",
"#[IO copy.file(\"$(SolutionDir)\\.tools\\gnt.bat\", \"$(odir)\\$(getcimName)\", true)]",
"",
"#[var wrVSSBE =@call :GetNuTool vsSolutionBuildEvent/#[$(vsixvnum)] || ( echo Please contact support >&2 & exit /B 1 )",
"( if \"%~1\"==\"\" packages\\vsSolutionBuildEvent.#[$(vsixvnum)]\\GUI ) & exit /B 0",
":GetNuTool",
"@echo off]",
"",
"#[File replace(\"$(odir)\\$(getcimName)\", \"@echo off\", \"$(wrVSSBE.Replace(\\\"\\n\\\", \\\"\\r\\n\\\"))\")]"
]
}
}
]
}