Skip to content

Commit 1b65047

Browse files
committed
Updated appveyor.yml
1 parent b791949 commit 1b65047

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

appveyor.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,30 @@ environment:
88
secure: cBxvAtTgSlWVblTXtx8QKygh2HQeYZ9i0plMjJzCTNInGCm1XyG+nrSs18qUtC8W
99
before_build:
1010
- ps: >-
11-
nuget restore
11+
dotnet restore
1212
13-
choco install -y --no-progress git.install GitReleaseManager.Portable
13+
dotnet tool install -g GitVersion.Tool
1414
15-
npm install github-release-notes -g
16-
17-
GitVersion /output buildserver /updateassemblyinfo
18-
19-
If (Test-Path ".\PreBuild.ps1") {
20-
21-
& ".\PreBuild.ps1"
22-
23-
}
15+
dotnet gitversion /output buildserver
2416
17+
npm install github-release-notes -g
18+
dotnet_csproj:
19+
patch: true
20+
file: '**\*.csproj'
21+
version: '{version}'
22+
package_version: $(GitVersion_NuGetVersion)
23+
assembly_version: $(GitVersion_AssemblySemVer)
24+
file_version: $(GitVersion_AssemblySemFileVer)
25+
informational_version: (GitVersion_InformationalVersion$)
2526
build:
2627
parallel: true
2728
verbosity: minimal
29+
publish_nuget: true
2830
after_build:
2931
- ps: >-
30-
Get-ChildItem -Recurse *.nuspec | foreach { nuget pack $_.FullName -Properties "Configuration=Release;Platform=AnyCPU" -Symbols -Version $Env:GitVersion_NuGetVersion }
32+
#dotnet pack $Env:APPVEYOR_PROJECT_NAME/$Env:APPVEYOR_PROJECT_NAME.csproj --configuration Release /p:Version="$Env:GitVersion_NuGetVersion"
3133
32-
$currentTag = git tag -l --points-at HEAD
34+
$currentCommitIsTagged = git tag -l --points-at HEAD
3335
3436
$HTTP_Request = [System.Net.WebRequest]::Create("https://api.github.com/repos/$env:GitHubOrganisation/$env:APPVEYOR_PROJECT_NAME/releases/tags/$Env:GitVersion_NuGetVersion")
3537
@@ -42,8 +44,9 @@ after_build:
4244
} catch [Net.WebException] {
4345
4446
[System.Net.HttpWebResponse] $resp = [System.Net.HttpWebResponse] $_.Exception.Response
47+
$noExistingGitHubRelease = $resp.StatusCode -eq 404
4548
46-
if ($currentTag -And $resp.StatusCode -eq 404) {
49+
if ($currentCommitIsTagged -And $noExistingGitHubRelease) {
4750
4851
$env:SHOULD_DEPLOY = 'true'
4952

0 commit comments

Comments
 (0)