Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 27ad1dc

Browse files
committed
Fix appveyor building twice
1 parent dfe1687 commit 27ad1dc

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

.build/default.ps1

+3-25
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ Task Build -depends Restore-Packages {
3838
exec { . $MSBuild $SolutionFile /t:Build /v:normal /p:Configuration=$Configuration-Net45 }
3939
}
4040

41-
Task Package -depends Update-AssemblyInfoFiles, Build {
41+
Task Package -depends Build {
4242
exec { . $NuGet pack "$SolutionRoot\Titanium.Web.Proxy\Titanium.Web.Proxy.nuspec" -Properties Configuration=$Configuration -OutputDirectory "$SolutionRoot" -Version "$Version" }
4343
}
4444

45-
Task Clean {
45+
Task Clean -depends Install-BuildTools {
4646
Remove-Item -Path "$SolutionRoot\packages\*" -Exclude repositories.config -Recurse -Force
4747
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { Remove-Item $_.fullname -Force -Recurse }
4848
exec { . $MSBuild $SolutionFile /t:Clean /v:quiet }
4949
}
5050

51-
Task Restore-Packages -depends Install-BuildTools {
51+
Task Restore-Packages {
5252
exec { . $NuGet restore $SolutionFile }
5353
}
5454

@@ -60,25 +60,3 @@ Task Install-MSBuild {
6060
}
6161

6262
Task Install-BuildTools -depends Install-MSBuild
63-
64-
# Borrowed from Luis Rocha's Blog (http://www.luisrocha.net/2009/11/setting-assembly-version-with-windows.html)
65-
Task Update-AssemblyInfoFiles {
66-
$assemblyVersionPattern = 'AssemblyVersion\("[0-9]+(\.([0-9]+|\*)){1,3}"\)'
67-
$fileVersionPattern = 'AssemblyFileVersion\("[0-9]+(\.([0-9]+|\*)){1,3}"\)'
68-
$fileCommitPattern = 'AssemblyInformationalVersion\("(.*?)"\)'
69-
70-
$assemblyVersion = 'AssemblyVersion("' + $Version + '")';
71-
$fileVersion = 'AssemblyFileVersion("' + $Version + '")';
72-
$commitVersion = 'AssemblyInformationalVersion("' + $InformationalVersion + '")';
73-
74-
Get-ChildItem -path $SolutionRoot -r -filter AssemblyInfo.cs | ForEach-Object {
75-
$filename = $_.Directory.ToString() + '\' + $_.Name
76-
$filename + ' -> ' + $Version
77-
78-
(Get-Content $filename) | ForEach-Object {
79-
% {$_ -replace $assemblyVersionPattern, $assemblyVersion } |
80-
% {$_ -replace $fileVersionPattern, $fileVersion } |
81-
% {$_ -replace $fileCommitPattern, $commitVersion }
82-
} | Set-Content $filename
83-
}
84-
}

appveyor.yml

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ assembly_info:
3535
# to disable automatic tests
3636
test: off
3737

38+
# skip building commits that add tags (such as release tag)
39+
skip_tags: true
40+
41+
3842
#---------------------------------#
3943
# artifacts configuration #
4044
#---------------------------------#

0 commit comments

Comments
 (0)