Skip to content

Commit 48f677b

Browse files
committed
Merge branch 'develop'
2 parents 9f6acb2 + 54bd6f7 commit 48f677b

36 files changed

+917
-780
lines changed

.travis.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,33 @@ mono: none
33
sudo: false
44
dotnet: 2.2
55
dist: xenial
6+
7+
68
script:
7-
- bash ./travis-build.sh
9+
- dotnet build -c Release
10+
- dotnet test -c Release --no-build
11+
- dotnet pack -c Release --no-build -p:NoWarn=NU5105
12+
13+
14+
deploy:
15+
16+
17+
- on:
18+
branch: master
19+
provider: script
20+
script:
21+
- dotnet nuget push **/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY
22+
skip_cleanup: true
23+
24+
25+
- on:
26+
branch: develop
27+
provider: script
28+
script:
29+
- dotnet nuget push **/*.nupkg -s https://www.myget.org/F/nettopologysuite/api/v2/package -k $MYGET_API_KEY
30+
skip_cleanup: true
31+
832
env:
933
global:
10-
secure: "RYzpD2A3pmq1lGGN/Bemrlk37jEqZSD6oWe40LQ8XHYeVUgiio/vdwhPdQNOT9y7/JK2eGzSiBfi5Z16AfKLa+/JAr2XIUKE+YhcAjlVmJrzhqRXFDLVOgtCJ1QzzV8s8f3nNgQC8Xw1y9T57wXv+u2Hrr/Xbis0cWHTDiEYyDpj2NijEdCJCyLtnR0TSoNsI4/pRp09OV5viUHgWstYiKzoHAcLTOSDtN2ARGRE51z2HWd7zCDKXi92h7t34kZ3ZTSy28wAxf/HrGX/2bLkNxERqj1KkjQ1T2K+KF4Cq8GgpTPzQpAdJCPGSSjkPHbh9HgV0QwToHfcALdHtka+o5h++OMCA91rDBP6UZgojE/9qQhZv1DEKeMLl+sRbnO+7AUsEouYFYpw0mbbI+xvtjIpRbtzRQ0WQV3k5IcBMvjB8SNSJrmSOcuPmbvJuuRlHeAUNrwELL+2kUqyQ42C+NgnpNaHUy4j/iYper/sVsg6eF7E9eBibIYMKXBtSPgkU/oV9fEDnskGeqXKSb3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jW+CcyBj8A9V9xTjOYIKAFqT2TZkhIo71SN2s15mU0J+MXJBVu7Jg9GhG1JLTE2TqbX12PWcw8Y0kHkbV0+6AnXmMFlgqYP2BjNYCcKP/wX47AUdM5ZLVSZnm52bTM7Mz272i5OvWv12cpJHDgdSCLoJvma/kVZ927ievwEhiajgcM3bEVXiByB6wYtczTmdz3c04aR4KJqh0DwJtadl7aQzhrZvsgm+HSWlOpizOska7VbmNbyODrv/m38lMxlPDAJVtCmy86CXCx0KI3jrcvtA+vJSiwo/QP6w1yU4sPsaL3fEW8oy4l7jQv9OPS6JBXed3x35JwZRfd8iQjo25+IS5KA9iWUWDYiROaWBQgxCs+/wAUiiFwPpU+7k1419XnUzwk+EAjQ6M9l3ZJTeop3XnjnNCrORu8Not48+AooGMTB3/n32OHe+CP536iuLWtFIwGpDiLCVTbifoy/o8gH0=

Directory.Build.props

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
4+
<PropertyGroup>
5+
<SolutionDir Condition=" '$(SolutionDir)' == '' ">$(MSBuildThisFileDirectory)</SolutionDir>
6+
7+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)nts.snk</AssemblyOriginatorKeyFile>
8+
</PropertyGroup>
9+
10+
</Project>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ See [`doc/release-notes.md`](doc/release-notes.md).
1616
## Project status
1717
| License | Travis | AppVeyor | NuGet | MyGet (pre-release) |
1818
| ------- | ------ | -------- | ----- | ------------------- |
19-
| [![License](https://img.shields.io/github/license/NetTopologySuite/NetTopologySuite.IO.GPX.svg)](https://github.com/NetTopologySuite/NetTopologySuite.IO.GPX/blob/develop/LICENSE.md) | [![Travis](https://travis-ci.org/NetTopologySuite/NetTopologySuite.IO.GPX.svg?branch=develop)](https://travis-ci.org/NetTopologySuite/NetTopologySuite.IO.GPX) | [![AppVeyor](https://ci.appveyor.com/api/projects/status/vbat0vo7yisud5sx/branch/develop?svg=true)](https://ci.appveyor.com/project/airbreather/nettopologysuite-io-gpx) | [![NuGet](https://img.shields.io/nuget/v/NetTopologySuite.IO.GPX.svg)](https://www.nuget.org/packages/NetTopologySuite.IO.GPX/) | [![MyGet](https://img.shields.io/myget/airbreather/vpre/NetTopologySuite.IO.GPX.svg?style=flat)](https://myget.org/feed/airbreather/package/nuget/NetTopologySuite.IO.GPX) |
19+
| [![License](https://img.shields.io/github/license/NetTopologySuite/NetTopologySuite.IO.GPX.svg)](https://github.com/NetTopologySuite/NetTopologySuite.IO.GPX/blob/develop/LICENSE.md) | [![Travis](https://travis-ci.org/NetTopologySuite/NetTopologySuite.IO.GPX.svg?branch=develop)](https://travis-ci.org/NetTopologySuite/NetTopologySuite.IO.GPX) | [![AppVeyor](https://ci.appveyor.com/api/projects/status/vbat0vo7yisud5sx/branch/develop?svg=true)](https://ci.appveyor.com/project/airbreather/nettopologysuite-io-gpx) | [![NuGet](https://img.shields.io/nuget/v/NetTopologySuite.IO.GPX.svg)](https://www.nuget.org/packages/NetTopologySuite.IO.GPX/) | [![MyGet](https://img.shields.io/myget/nettopologysuite/vpre/NetTopologySuite.IO.GPX.svg?style=flat)](https://myget.org/feed/nettopologysuite/package/nuget/NetTopologySuite.IO.GPX) |

doc/release-notes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# NetTopologySuite.IO.GPX Release Notes
22

3+
## 1.0.0
4+
- Updates to make this compatible with v2 of the core NTS library.
5+
36
## 0.6.0
47
- Mark upper-bounds on package dependencies to make it clear that this only supports the 1.x series.
58

src/Directory.Build.props

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
4+
<Import Project="../Directory.Build.props" />
5+
6+
<PropertyGroup>
7+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
8+
</PropertyGroup>
9+
10+
<!-- Travis-CI -->
11+
<PropertyGroup Condition=" '$(TRAVIS)' == 'True' ">
12+
<Deterministic>true</Deterministic>
13+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
14+
<NtsBuildMetadata Condition=" '$(NtsBuildMetadata)' == '' ">ci.travis.$(TRAVIS_BUILD_NUMBER)</NtsBuildMetadata>
15+
16+
<NtsOfficialRelease Condition=" '$(TRAVIS_BRANCH)' == 'master' And '$(TRAVIS_PULL_REQUEST)' == 'false' ">true</NtsOfficialRelease>
17+
</PropertyGroup>
18+
19+
<!-- TeamCity -->
20+
<PropertyGroup Condition=" '$(TEAMCITY_VERSION)' != '' ">
21+
<Deterministic>true</Deterministic>
22+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
23+
<NtsBuildMetadata Condition=" '$(NtsBuildMetadata)' == '' ">ci.teamcity.$(BUILD_NUMBER)</NtsBuildMetadata>
24+
</PropertyGroup>
25+
26+
<!-- AppVeyor -->
27+
<PropertyGroup Condition=" '$(APPVEYOR)' == 'True' ">
28+
<Deterministic>true</Deterministic>
29+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
30+
<NtsBuildMetadata Condition=" '$(NtsBuildMetadata)' == '' ">ci.appveyor.$(APPVEYOR_BUILD_NUMBER)</NtsBuildMetadata>
31+
</PropertyGroup>
32+
33+
<!-- Fallback for local builds and CI environments we don't recognize -->
34+
<PropertyGroup>
35+
<NtsBuildMetadata Condition=" '$(NtsBuildMetadata)' == '' ">local</NtsBuildMetadata>
36+
</PropertyGroup>
37+
38+
<PropertyGroup Label="Version numbers">
39+
<!-- MAJOR, MINOR, and PATCH are defined according to SemVer 2.0.0. -->
40+
<NtsMajorVersion>1</NtsMajorVersion>
41+
<NtsMinorVersion>0</NtsMinorVersion>
42+
<NtsPatchVersion>0</NtsPatchVersion>
43+
44+
<NtsBuildTimestamp>$([System.DateTime]::UtcNow.Ticks)</NtsBuildTimestamp>
45+
<NtsDaysSinceEpoch>$([System.DateTime]::op_Subtraction($([System.DateTime]::new($(NtsBuildTimestamp)).Date),$([System.DateTime]::new(621355968000000000))).TotalDays.ToString("00000"))</NtsDaysSinceEpoch>
46+
47+
<!--
48+
Note that, since this causes our version number to tick over every
49+
minute, we see a (far less severe) variant of dotnet/project-system#1457
50+
where VS decides to restore packages at seemingly random times.
51+
-->
52+
<NtsMinutesSinceStartOfUtcDay>$([System.DateTime]::new($(NtsBuildTimestamp)).TimeOfDay.TotalMinutes.ToString("0000"))</NtsMinutesSinceStartOfUtcDay>
53+
54+
<VersionPrefix>$(NtsMajorVersion).$(NtsMinorVersion).$(NtsPatchVersion)</VersionPrefix>
55+
<VersionSuffix Condition=" '$(VersionSuffix)' == '' And '$(NtsOfficialRelease)' != 'true' ">pre.$(NtsDaysSinceEpoch)$(NtsMinutesSinceStartOfUtcDay)+$(NtsBuildMetadata)</VersionSuffix>
56+
57+
<!--
58+
A sample of what this could have been on 2019-05-13 at 11:00:00 PM UTC:
59+
NtsBuildTimestamp = 636933024000000000
60+
61+
NtsMajorVersion = 2
62+
NtsMinorVersion = 0
63+
NtsPatchVersion = 0
64+
VersionPrefix = 2.0.0
65+
66+
NtsDaysSinceEpoch = 18029
67+
NtsMinutesSinceStartOfUtcDay = 1380
68+
NtsBuildMetadata = local
69+
VersionSuffix = pre.180291380+local
70+
71+
(ultimate) package version = 2.0.0-pre.180291380+local
72+
-->
73+
</PropertyGroup>
74+
75+
<PropertyGroup Label="Assembly Info">
76+
<!-- See https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/versioning -->
77+
<AssemblyVersion>$(NtsMajorVersion).0.0.0</AssemblyVersion>
78+
<AssemblyFileVersion>$(NtsMajorVersion).$(NtsMinorVersion).$(NtsPatchVersion).$(NtsBuildNumber)</AssemblyFileVersion>
79+
80+
<Company>NetTopologySuite - Team</Company>
81+
82+
<CopyrightPeople>$(Company)</CopyrightPeople>
83+
<Copyright>Copyright © $([System.DateTime]::UtcNow.Year) $(CopyrightPeople)</Copyright>
84+
</PropertyGroup>
85+
86+
<PropertyGroup Label="SourceLink Info">
87+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
88+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
89+
<IncludeSymbols>true</IncludeSymbols>
90+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
91+
</PropertyGroup>
92+
93+
<ItemGroup>
94+
<!-- SourceLink adds stuff to let debuggers step into our code. -->
95+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All" />
96+
</ItemGroup>
97+
98+
</Project>

src/NetTopologySuite.IO.GPX/GpxBoundingBox.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ public sealed class GpxBoundingBox : ICanWriteToXmlWriter
3434
/// </param>
3535
public GpxBoundingBox(GpxLongitude minLongitude, GpxLatitude minLatitude, GpxLongitude maxLongitude, GpxLatitude maxLatitude)
3636
{
37-
this.MinLongitude = minLongitude;
38-
this.MinLatitude = minLatitude;
39-
this.MaxLongitude = maxLongitude;
40-
this.MaxLatitude = maxLatitude;
37+
MinLongitude = minLongitude;
38+
MinLatitude = minLatitude;
39+
MaxLongitude = maxLongitude;
40+
MaxLatitude = maxLatitude;
4141
}
4242

4343
/// <summary>
@@ -74,19 +74,19 @@ public GpxBoundingBox(GpxLongitude minLongitude, GpxLatitude minLatitude, GpxLon
7474

7575
/// <inheritdoc />
7676
public override bool Equals(object obj) => obj is GpxBoundingBox other &&
77-
this.MinLongitude == other.MinLongitude &&
78-
this.MinLatitude == other.MinLatitude &&
79-
this.MaxLongitude == other.MaxLongitude &&
80-
this.MaxLatitude == other.MaxLatitude;
77+
MinLongitude == other.MinLongitude &&
78+
MinLatitude == other.MinLatitude &&
79+
MaxLongitude == other.MaxLongitude &&
80+
MaxLatitude == other.MaxLatitude;
8181

8282
/// <inheritdoc />
83-
public override int GetHashCode() => (this.MinLongitude, this.MinLatitude, this.MaxLongitude, this.MaxLatitude).GetHashCode();
83+
public override int GetHashCode() => (MinLongitude, MinLatitude, MaxLongitude, MaxLatitude).GetHashCode();
8484

8585
/// <inheritdoc />
86-
public override string ToString() => Helpers.BuildString((nameof(this.MinLongitude), this.MinLongitude),
87-
(nameof(this.MinLatitude), this.MinLatitude),
88-
(nameof(this.MaxLongitude), this.MaxLongitude),
89-
(nameof(this.MaxLatitude), this.MaxLatitude));
86+
public override string ToString() => Helpers.BuildString((nameof(MinLongitude), MinLongitude),
87+
(nameof(MinLatitude), MinLatitude),
88+
(nameof(MaxLongitude), MaxLongitude),
89+
(nameof(MaxLatitude), MaxLatitude));
9090

9191
internal static GpxBoundingBox Load(XElement element)
9292
{
@@ -104,10 +104,10 @@ internal static GpxBoundingBox Load(XElement element)
104104

105105
void ICanWriteToXmlWriter.Save(XmlWriter writer)
106106
{
107-
writer.WriteAttributeString("minlat", this.MinLatitude.Value.ToRoundTripString(CultureInfo.InvariantCulture));
108-
writer.WriteAttributeString("minlon", this.MinLongitude.Value.ToRoundTripString(CultureInfo.InvariantCulture));
109-
writer.WriteAttributeString("maxlat", this.MaxLatitude.Value.ToRoundTripString(CultureInfo.InvariantCulture));
110-
writer.WriteAttributeString("maxlon", this.MaxLongitude.Value.ToRoundTripString(CultureInfo.InvariantCulture));
107+
writer.WriteAttributeString("minlat", MinLatitude.Value.ToRoundTripString(CultureInfo.InvariantCulture));
108+
writer.WriteAttributeString("minlon", MinLongitude.Value.ToRoundTripString(CultureInfo.InvariantCulture));
109+
writer.WriteAttributeString("maxlat", MaxLatitude.Value.ToRoundTripString(CultureInfo.InvariantCulture));
110+
writer.WriteAttributeString("maxlon", MaxLongitude.Value.ToRoundTripString(CultureInfo.InvariantCulture));
111111
}
112112
}
113113
}

src/NetTopologySuite.IO.GPX/GpxCopyright.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ public GpxCopyright(string author)
4444
/// </exception>
4545
public GpxCopyright(string author, int? year, Uri licenseUri)
4646
{
47-
this.Author = author ?? throw new ArgumentNullException(nameof(author));
48-
this.Year = year;
49-
this.LicenseUri = licenseUri;
47+
Author = author ?? throw new ArgumentNullException(nameof(author));
48+
Year = year;
49+
LicenseUri = licenseUri;
5050
}
5151

5252
/// <summary>
@@ -84,17 +84,17 @@ public GpxCopyright(string author, int? year, Uri licenseUri)
8484

8585
/// <inheritdoc />
8686
public override bool Equals(object obj) => obj is GpxCopyright other &&
87-
this.Author == other.Author &&
88-
this.Year == other.Year &&
89-
this.LicenseUri == other.LicenseUri;
87+
Author == other.Author &&
88+
Year == other.Year &&
89+
LicenseUri == other.LicenseUri;
9090

9191
/// <inheritdoc />
92-
public override int GetHashCode() => (this.Author, this.Year, this.LicenseUri).GetHashCode();
92+
public override int GetHashCode() => (Author, Year, LicenseUri).GetHashCode();
9393

9494
/// <inheritdoc />
95-
public override string ToString() => Helpers.BuildString((nameof(this.Author), this.Author),
96-
(nameof(this.Year), this.Year),
97-
(nameof(this.LicenseUri), this.LicenseUri));
95+
public override string ToString() => Helpers.BuildString((nameof(Author), Author),
96+
(nameof(Year), Year),
97+
(nameof(LicenseUri), LicenseUri));
9898

9999
/// <summary>
100100
/// Builds a new instance of <see cref="GpxCopyright"/> as a copy of this instance, but with
@@ -110,7 +110,7 @@ public override string ToString() => Helpers.BuildString((nameof(this.Author), t
110110
/// <exception cref="ArgumentNullException">
111111
/// Thrown when <paramref name="author"/> is <see langword="null"/>.
112112
/// </exception>
113-
public GpxCopyright WithAuthor(string author) => new GpxCopyright(author, this.Year, this.LicenseUri);
113+
public GpxCopyright WithAuthor(string author) => new GpxCopyright(author, Year, LicenseUri);
114114

115115
/// <summary>
116116
/// Builds a new instance of <see cref="GpxCopyright"/> as a copy of this instance, but with
@@ -123,7 +123,7 @@ public override string ToString() => Helpers.BuildString((nameof(this.Author), t
123123
/// A new <see cref="GpxCopyright"/> instance that's a copy of the current instance, but
124124
/// with its <see cref="Year"/> value set to <paramref name="year"/>.
125125
/// </returns>
126-
public GpxCopyright WithYear(int? year) => new GpxCopyright(this.Author, year, this.LicenseUri);
126+
public GpxCopyright WithYear(int? year) => new GpxCopyright(Author, year, LicenseUri);
127127

128128
/// <summary>
129129
/// Builds a new instance of <see cref="GpxCopyright"/> as a copy of this instance, but with
@@ -136,7 +136,7 @@ public override string ToString() => Helpers.BuildString((nameof(this.Author), t
136136
/// A new <see cref="GpxCopyright"/> instance that's a copy of the current instance, but
137137
/// with its <see cref="LicenseUri"/> value set to <paramref name="licenseUri"/>.
138138
/// </returns>
139-
public GpxCopyright WithLicenseUri(Uri licenseUri) => new GpxCopyright(this.Author, this.Year, licenseUri);
139+
public GpxCopyright WithLicenseUri(Uri licenseUri) => new GpxCopyright(Author, Year, licenseUri);
140140

141141
internal static GpxCopyright Load(XElement element)
142142
{
@@ -153,9 +153,9 @@ internal static GpxCopyright Load(XElement element)
153153

154154
void ICanWriteToXmlWriter.Save(XmlWriter writer)
155155
{
156-
writer.WriteAttributeString("author", this.Author);
157-
writer.WriteOptionalGpxElementValue("year", this.Year?.ToString("0000", CultureInfo.InvariantCulture));
158-
writer.WriteOptionalGpxElementValue("license", this.LicenseUri?.OriginalString);
156+
writer.WriteAttributeString("author", Author);
157+
writer.WriteOptionalGpxElementValue("year", Year?.ToString("0000", CultureInfo.InvariantCulture));
158+
writer.WriteOptionalGpxElementValue("license", LicenseUri?.OriginalString);
159159
}
160160
}
161161
}

0 commit comments

Comments
 (0)