Skip to content

Commit e138d1e

Browse files
committed
switch to GitVersion for versioning
1 parent a48f63e commit e138d1e

4 files changed

+50
-27
lines changed

GitVersion.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
assembly-versioning-scheme: MajorMinorPatch
2+
mode: Mainline
3+
next-version: 0.30.0
4+
branches: {}
5+
ignore:
6+
sha: []

appveyor.gitversion.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
install:
2+
- choco install gitversion.portable -pre -y
3+
4+
assembly_info:
5+
patch: false
6+
7+
before_build:
8+
- nuget restore
9+
- ps: gitversion /l console /output buildserver /updateAssemblyInfo
10+
11+
build:
12+
project: <your sln file>
13+
14+
after_build:
15+
- cmd: ECHO nuget pack <Project>\<NuSpec>.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
16+
- cmd: nuget pack <Project>\<NuSpec>.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
17+
- cmd: appveyor PushArtifact "<NuSpec>.%GitVersion_NuGetVersion%.nupkg"

appveyor.yml

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
version: 0.25.{build}
1+
version: 0.30.{build}
22

33
pull_requests:
44
do_not_increment_build_number: true
55

66
configuration: Release
77

8-
shallow_clone: true
8+
#shallow_clone: true
9+
clone_depth: 10
910

1011
image: Visual Studio 2017
1112

12-
init:
13-
- ps: >
14-
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
13+
install:
14+
- choco install gitversion.portable -pre -y
1515

16-
if($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_TAG_NAME.StartsWith("v") -eq $true) {
17-
18-
Set-AppVeyorBuildVariable -Name APPVEYOR_BUILD_VERSION -Value $env:APPVEYOR_REPO_TAG_NAME.Substring(1)
19-
20-
}
21-
16+
#init:
17+
#- ps: >
18+
# iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
19+
#
20+
# if($env:APPVEYOR_REPO_TAG -eq "true" -And $env:APPVEYOR_REPO_TAG_NAME.StartsWith("v") -eq $true) {
21+
#
22+
# Set-AppVeyorBuildVariable -Name APPVEYOR_BUILD_VERSION -Value $env:APPVEYOR_REPO_TAG_NAME.Substring(1)
23+
#
24+
# }
25+
#
2226

2327
assembly_info:
24-
patch: true
25-
file: '**\AssemblyInfo.*'
26-
assembly_version: '{version}'
27-
assembly_file_version: '{version}'
28-
assembly_informational_version: '{version}'
28+
patch: false
2929

3030
environment:
3131
GOOGLE_API_KEY:
@@ -34,13 +34,17 @@ environment:
3434
secure: tXLj55KTiLnAgoQp6lXCHg==
3535

3636
before_build:
37+
# - nuget restore
38+
- ps: gitversion /l console /output buildserver /updateAssemblyInfo
3739
- msbuild src\GoogleMapsForNET.sln /t:restore
3840

39-
build_script:
40-
- cmd: msbuild src\GoogleMapsForNET.sln /t:build /p:Configuration=Release /verbosity:minimal
41+
build:
42+
project: src\GoogleMapsForNET.sln
4143

4244
after_build:
43-
- cmd: nuget pack gmaps-api-net.nuspec -version %APPVEYOR_BUILD_VERSION%
45+
#- cmd: nuget pack gmaps-api-net.nuspec -version %APPVEYOR_BUILD_VERSION%
46+
- cmd: ECHO nuget pack gmaps-api-net.nuspec -version "%GitVersion_NuGetVersion%"
47+
- cmd: nuget pack gmaps-api-net.nuspec -version "%GitVersion_NuGetVersion%"
4448

4549
test_script:
4650
- ps: >-
@@ -65,7 +69,7 @@ deploy:
6569
secure: 2SwDMmXZZtgoLWsldKZ8GCu9rZXpO5quTYtSNJQSeeiqDjnmo0OfutNVcH3jsfpj
6670
artifact: NugetPackage
6771
on:
68-
APPVEYOR_REPO_TAG: true
72+
APPVEYOR_REPO_TAG: true1
6973
- provider: GitHub
7074
tag: v$(APPVEYOR_BUILD_VERSION)
7175
auth_token:
@@ -74,7 +78,7 @@ deploy:
7478
draft: true
7579
force_update: true
7680
on:
77-
APPVEYOR_REPO_TAG: true
81+
APPVEYOR_REPO_TAG: true1
7882

7983
notifications:
8084
- provider: Email
@@ -84,7 +88,3 @@ notifications:
8488
on_build_success: true
8589
on_build_failure: true
8690
on_build_status_changed: true
87-
88-
# Temporary workaround for AppVeyor -> NuGet connectivity issues
89-
hosts:
90-
api.nuget.org: 93.184.221.200

gmaps-api-net.nuspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<id>gmaps-api-net</id>
55
<version>$version$</version>
66
<title />
7-
<authors>Eric Newton,Richard Thombs</authors>
8-
<owners>Eric Newton,Richard Thombs,Luis Farzati</owners>
7+
<authors>Eric Newton</authors>
8+
<owners>Eric Newton,Luis Farzati</owners>
99
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
1010
<projectUrl>http://github.com/ericnewton76/gmaps-api-net</projectUrl>
1111
<requireLicenseAcceptance>false</requireLicenseAcceptance>

0 commit comments

Comments
 (0)