This repository was archived by the owner on Oct 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.vssbe
204 lines (204 loc) · 7.51 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
{
"Header": {
"_": [
" This requires vsSolutionBuildEvent engine.",
" Free plugin for Visual Studio or MSBuild Tools:",
" * https://github.com/3F/vsSolutionBuildEvent",
" * https://visualstudiogallery.msdn.microsoft.com/0d1dbfd7-ed8a-40af-ae39-281bfeca2334/",
" Feedback: github.com/3F or [email protected]"
],
"Compatibility": "0.9"
},
"Components": [
{
"ClassName": "InternalComponent",
"Enabled": true
},
{
"ClassName": "UserVariableComponent",
"Enabled": true
},
{
"ClassName": "TryComponent",
"Enabled": true
},
{
"ClassName": "OWPComponent",
"Enabled": true
},
{
"ClassName": "NuGetComponent",
"Enabled": true
},
{
"ClassName": "FunctionComponent",
"Enabled": true
},
{
"ClassName": "FileComponent",
"Enabled": true
},
{
"ClassName": "DTEComponent",
"Enabled": true
},
{
"ClassName": "BuildComponent",
"Enabled": true
},
{
"ClassName": "BoxComponent",
"Enabled": true
},
{
"ClassName": "SevenZipComponent",
"Enabled": true
},
{
"ClassName": "ConditionComponent",
"Enabled": true
},
{
"ClassName": "MSBuildComponent",
"Enabled": true
},
{
"ClassName": "CommentComponent",
"Enabled": true
}
],
"PreBuild": [
{
"Enabled": false,
"Name": "Act",
"Caption": "",
"SupportMSBuild": true,
"SupportSBEScripts": true,
"IgnoreIfBuildFailed": false,
"BuildType": "Common",
"Confirmation": false,
"ToConfiguration": [
"Debug|x64",
"Release|x64"
],
"ExecutionOrder": {
"$type": "net.r_eg.vsSBE.Events.ExecutionOrder[], vsSolutionBuildEvent",
"$values": []
},
"Process": {
"$type": "net.r_eg.vsSBE.Events.EventProcess, vsSolutionBuildEvent",
"Waiting": true,
"Hidden": true,
"TimeLimit": 30
},
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeCSharp, vsSolutionBuildEvent",
"Type": "CSharp",
"References": [
"System.dll"
],
"SmartReferences": true,
"GenerateInMemory": true,
"TreatWarningsAsErrors": true,
"WarningLevel": 4,
"FilesMode": false,
"CachingBytecode": false,
"LastTime": 0,
"Command": "using ICommand = net.r_eg.vsSBE.Actions.ICommand;\r\nusing ISolutionEvent = net.r_eg.vsSBE.Events.ISolutionEvent;\r\n\r\nnamespace vsSolutionBuildEvent\r\n{\r\n public class CSharpMode\r\n {\r\n public static int Init(ICommand cmd, ISolutionEvent evt)\r\n {\r\n return 0;\r\n }\r\n }\r\n}",
"Command__": [
"using ICommand = net.r_eg.vsSBE.Actions.ICommand;",
"using ISolutionEvent = net.r_eg.vsSBE.Events.ISolutionEvent;",
"",
"namespace vsSolutionBuildEvent",
"{",
" public class CSharpMode",
" {",
" public static int Init(ICommand cmd, ISolutionEvent evt)",
" {",
" return 0;",
" }",
" }",
"}"
]
}
},
{
"Enabled": true,
"Name": "Act1",
"Caption": "Final script from 'Automatic Version Numbering'",
"SupportMSBuild": true,
"SupportSBEScripts": true,
"IgnoreIfBuildFailed": false,
"BuildType": "Common",
"Confirmation": false,
"ToConfiguration": [],
"ExecutionOrder": {
"$type": "net.r_eg.vsSBE.Events.ExecutionOrder[], vsSolutionBuildEvent",
"$values": []
},
"Process": {
"$type": "net.r_eg.vsSBE.Events.EventProcess, vsSolutionBuildEvent",
"Waiting": true,
"Hidden": true,
"TimeLimit": 30
},
"Mode": {
"$type": "net.r_eg.vsSBE.Events.ModeScript, vsSolutionBuildEvent",
"Type": "Script",
"Command": "#[\" \r\n Prepare data\r\n\"]\r\n#[var input = ]\r\n#[var ver = #[File get(\"#[var input]\")]]\r\n#[var fout = ]\r\n\r\n#[var tpl = // This code was generated by a vsSolutionBuildEvent. \r\n// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.\r\nnamespace dotNetTips.Utility\r\n{\r\n internal struct Version\r\n {\r\n public static readonly System.Version number = new System.Version(%number%);\r\n public const string numberString = \"%numberString%\";\r\n public const string numberWithRevString = \"%numberWithRevString%\";\r\n }\r\n}]\r\n\r\n#[\" \r\n Calculate revision\r\n\"]\r\n#[var tBase = $([System.DateTime]::Parse('2017/03/11').ToBinary())]\r\n#[var tNow = $([System.DateTime]::UtcNow.Ticks)]\r\n#[var Revision = $([System.TimeSpan]::FromTicks('$([MSBuild]::Subtract($(tNow), $(tBase)))').TotalMinutes.ToString('0'))]\r\n\r\n#[$(revMin = 100)] #[$(revMax = 100000)]\r\n#[var Revision = $([MSBuild]::Add($(revMin), $([MSBuild]::Modulo($(Revision), $([MSBuild]::Subtract($(revMax), $(revMin)))))))]\r\n\r\n#[\" \r\n Remove placeholders\r\n\"]\r\n#[var tpl = $(tpl.Replace(\"%number%\", \"$(ver.Replace('.', ', ')), $(Revision)\"))]\r\n#[var tpl = $(tpl.Replace(\"%numberWithRevString%\", \"$(ver).$(Revision)\").Replace(\"%numberString%\", \"$(ver)\"))]\r\n\r\n\r\n#[\" \r\n Save result\r\n\"]\r\n#[File write(\"#[var fout]\"):#[var tpl]]",
"Command__": [
"#[\" ",
" Prepare data",
"\"]",
"#[var input = ]",
"#[var ver = #[File get(\"#[var input]\")]]",
"#[var fout = ]",
"",
"#[var tpl = // 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 dotNetTips.Utility",
"{",
" internal struct Version",
" {",
" public static readonly System.Version number = new System.Version(%number%);",
" public const string numberString = \"%numberString%\";",
" public const string numberWithRevString = \"%numberWithRevString%\";",
" }",
"}]",
"",
"#[\" ",
" Calculate revision",
"\"]",
"#[var tBase = $([System.DateTime]::Parse('2017/03/11').ToBinary())]",
"#[var tNow = $([System.DateTime]::UtcNow.Ticks)]",
"#[var Revision = $([System.TimeSpan]::FromTicks('$([MSBuild]::Subtract($(tNow), $(tBase)))').TotalMinutes.ToString('0'))]",
"",
"#[$(revMin = 100)] #[$(revMax = 100000)]",
"#[var Revision = $([MSBuild]::Add($(revMin), $([MSBuild]::Modulo($(Revision), $([MSBuild]::Subtract($(revMax), $(revMin)))))))]",
"",
"#[\" ",
" Remove placeholders",
"\"]",
"#[var tpl = $(tpl.Replace(\"%number%\", \"$(ver.Replace('.', ', ')), $(Revision)\"))]",
"#[var tpl = $(tpl.Replace(\"%numberWithRevString%\", \"$(ver).$(Revision)\").Replace(\"%numberString%\", \"$(ver)\"))]",
"",
"",
"#[\" ",
" Save result",
"\"]",
"#[File write(\"#[var fout]\"):#[var tpl]]"
]
}
}
],
"PostBuild": [],
"CancelBuild": [],
"WarningsBuild": [],
"ErrorsBuild": [],
"OWPBuild": [],
"Transmitter": [],
"CommandEvent": [],
"Logging": [],
"SlnOpened": [],
"SlnClosed": []
}