Skip to content

Commit dd8c5b0

Browse files
committed
Test: Trying to move appveyor.yml to one of the projects (BuildTools) to automate updating of build version via T4.
1 parent e50f969 commit dd8c5b0

File tree

6 files changed

+77
-1
lines changed

6 files changed

+77
-1
lines changed

Diff for: BuildTools/BuildTools.csproj

+14
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@
4848
</ItemGroup>
4949
<ItemGroup>
5050
<None Include="App.config" />
51+
<None Include="appveyor.yml">
52+
<AutoGen>True</AutoGen>
53+
<DesignTime>True</DesignTime>
54+
<DependentUpon>appveyor.tt</DependentUpon>
55+
</None>
56+
</ItemGroup>
57+
<ItemGroup>
58+
<Content Include="appveyor.tt">
59+
<Generator>TextTemplatingFileGenerator</Generator>
60+
<LastGenOutput>appveyor.yml</LastGenOutput>
61+
</Content>
62+
</ItemGroup>
63+
<ItemGroup>
64+
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
5165
</ItemGroup>
5266
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5367
<PropertyGroup>

Diff for: BuildTools/appveyor.tt

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<#@ template debug="false" hostspecific="true" language="C#" #>
2+
<#@ output extension=".yml" #>
3+
<#@ include file="../RefactoringEssentials/Versioning.t4.template" #>
4+
<# ReadVersions(Path.Combine(Path.GetDirectoryName(Host.TemplateFile), "../RefactoringEssentials/RefactoringEssentials.version")); #>
5+
-
6+
branches:
7+
only:
8+
- release
9+
10+
version: <#= generatedAppVeyorVersion #>.{build}
11+
12+
os: Visual Studio 2015
13+
14+
install:
15+
- cmd: set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
16+
- ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
17+
18+
build_script:
19+
- msbuild RefactoringEssentials.sln /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
20+
21+
after_test:
22+
- cmd: nuget pack bin\Release\RefactoringEssentials.nuspec -NoPackageAnalysis -BasePath bin\Release -OutputDirectory bin\Release
23+
- cmd: nuget pack bin\Release\RefactoringEssentials.Library.nuspec -NoPackageAnalysis -BasePath bin\Release -OutputDirectory bin\Release
24+
25+
artifacts:
26+
- path: bin\**\*.nupkg
27+
name: NuGet
28+
29+
- path: bin\**\*.vsix
30+
name: VSIX
31+
32+
-
33+
branches:
34+
only:
35+
- master
36+
37+
version: <#= generatedAppVeyorVersion #>.{build}
38+
39+
os: Visual Studio 2015
40+
41+
install:
42+
- cmd: set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
43+
- ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
44+
45+
before_build:
46+
- ps: Vsix-IncrementVsixVersion | Vsix-UpdateBuildVersion
47+
48+
build_script:
49+
- msbuild RefactoringEssentials.sln /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
50+
51+
after_test:
52+
- ps: Vsix-PushArtifacts | Vsix-PublishToGallery
53+

Diff for: appveyor.yml renamed to BuildTools/appveyor.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
-
23
branches:
34
only:

Diff for: RefactoringEssentials.sln

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj
2929
EndProject
3030
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E7481F91-77A4-49F6-ACC7-B8145827C384}"
3131
ProjectSection(SolutionItems) = preProject
32-
appveyor.yml = appveyor.yml
3332
README.md = README.md
3433
EndProjectSection
3534
EndProject

Diff for: RefactoringEssentials/RefactoringEssentials.version

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
appveyor_version=1.2
12
nuget_version=1.2.0
23
full_version=1.2.0.0
34
release_notes_link=https://github.com/icsharpcode/RefactoringEssentials/wiki/Release-1.2

Diff for: RefactoringEssentials/Versioning.t4.template

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<#@ import namespace="System.IO" #>
55
<#@ import namespace="System.Collections.Generic" #>
66
<#+
7+
string generatedAppVeyorVersion = "";
78
string generatedNuGetVersion = "";
89
string generatedFullVersion = "";
910
string generatedShortVersion = "";
@@ -29,6 +30,13 @@ void ReadVersions(string inputFileName)
2930
}
3031
break;
3132

33+
case "appveyor_version":
34+
if (settingParts.Length > 1)
35+
{
36+
generatedAppVeyorVersion = settingParts[1];
37+
}
38+
break;
39+
3240
case "nuget_version":
3341
if (settingParts.Length > 1)
3442
{

0 commit comments

Comments
 (0)