Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

preparing 'mapbox-sdk-unity-core' to become 'mapbox-sdk-cs' #48

Merged
merged 11 commits into from
Feb 20, 2017
Merged
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ language:
- csharp

solution:
- MapboxSDKUnity.sln
- MapboxSdkCs.sln

mono:
- 4.6.1

install:
- nuget restore MapboxSDKUnityCore.sln
- nuget restore MapboxSdkCs.sln

script:
- xbuild /p:Configuration=Release /p:CIBuild=true /p:StyleCopTreatErrorsAsWarnings=false MapboxSDKUnityCore.sln
- xbuild /p:Configuration=Release /p:CIBuild=true /p:StyleCopTreatErrorsAsWarnings=true MapboxSdkCs.sln
- mono packages/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe bin/Release/test/Mapbox.UnitTest.dll
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

If you want to contribute code:

1. Ensure that existing [pull requests](https://github.com/mapbox/mapbox-sdk-unity-core/pulls) and [issues](https://github.com/mapbox/mapbox-sdk-unity-core/issues) don’t already cover your contribution or question.
1. Ensure that existing [pull requests](https://github.com/mapbox/mapbox-sdk-cs/pulls) and [issues](https://github.com/mapbox/mapbox-sdk-cs/issues) don’t already cover your contribution or question.

2. Pull requests are gladly accepted. We require code reviews before merging PRs. When your tests pass, tag a project contributor (for example, @tmpsantos or @BergWerkGIS) and request a review.

Expand All @@ -22,11 +22,11 @@ Coming soon.

# Running tests

Tests are located in [test/UnitTest](https://github.com/mapbox/mapbox-sdk-unity-core/tree/master/test/UnitTest). On Linux or a mac run them with Mono, `mono packages/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe bin/Debug/test/Mapbox.UnitTest.dll` or from within your IDE of choice. Tests require a valid MAPBOX_ACCESS_TOKEN env variable in order to pass. Get a MAPBOX_ACCESS_TOKEN by logging into [Mapbox Studio](https://www.mapbox.com/studio/).
Tests are located in [test/UnitTest](https://github.com/mapbox/mapbox-sdk-cs/tree/master/test/UnitTest). On Linux or a mac run them with Mono, `mono packages/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe bin/Debug/test/Mapbox.UnitTest.dll` or from within your IDE of choice. Tests require a valid MAPBOX_ACCESS_TOKEN env variable in order to pass. Get a MAPBOX_ACCESS_TOKEN by logging into [Mapbox Studio](https://www.mapbox.com/studio/).

# Generating documentation

Documentation for the the Mapbox Unity SDK is automatically generated from XML headers in code. *Instructions for generating documentation are coming soon*.
Documentation for the the Mapbox SDK C# is automatically generated from XML headers in code. *Instructions for generating documentation are coming soon*.

# Code of conduct

Expand Down
14 changes: 6 additions & 8 deletions MapboxSDKUnityCore.nuspec → MapboxSdkCs.nuspec
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>MapboxSDKforUnityCore</id>
<title>Mapbox SDK for Unity - Core</title>
<id>MapboxSdkCs</id>
<title>A C# client to Mapbox services</title>
<version>$version$</version>
<authors>Mapbox</authors>
<owners>Mapbox</owners>
<licenseUrl>https://github.com/mapbox/mapbox-sdk-unity-core</licenseUrl>
<projectUrl>https://github.com/mapbox/mapbox-sdk-unity-core</projectUrl>
<licenseUrl>https://github.com/mapbox/mapbox-sdk-cs</licenseUrl>
<projectUrl>https://github.com/mapbox/mapbox-sdk-cs</projectUrl>
<!--<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>-->
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Core modules for accessing Mapbox services</description>
<summary>Core modules for accessing Mapbox services</summary>
<releaseNotes>Inital packaging</releaseNotes>
<copyright>Copyright 2016</copyright>
<tags>Mapbox SDK Unity Vectortiles</tags>
<copyright>Copyright 2017</copyright>
<tags>Mapbox SDK CSharp Geocoding Directions Vectortiles</tags>
</metadata>
<files>
<!--
Expand All @@ -23,14 +23,12 @@
<file src="bin\$configuration$\Mapbox.Json.dll" target="lib\net35\"></file>
<file src="bin\$configuration$\Mapbox.Map.dll" target="lib\net35\"></file>
<file src="bin\$configuration$\Mapbox.Platform.dll" target="lib\net35\"></file>
<file src="bin\$configuration$\Mapbox.Unity.dll" target="lib\net35\"></file>
<file src="bin\$configuration$\Mapbox.Utils.dll" target="lib\net35\"></file>
-->
<file src="src\Directions\**\*.cs" exclude="**\Properties\AssemblyInfo.cs" target="content\sdkproject\Assets\Mapbox\Core\Directions\"></file>
<file src="src\Geocoding\**\*.cs" exclude="**\Properties\AssemblyInfo.cs" target="content\sdkproject\Assets\Mapbox\Core\Geocoding\"></file>
<file src="src\Map\**\*.cs" exclude="**\Properties\AssemblyInfo.cs" target="content\sdkproject\Assets\Mapbox\Core\Map\"></file>
<file src="src\Platform\**\*.cs" exclude="**\Properties\AssemblyInfo.cs" target="content\sdkproject\Assets\Mapbox\Core\Platform\"></file>
<file src="src\Unity\**\*.cs" exclude="**\Properties\AssemblyInfo.cs" target="content\sdkproject\Assets\Mapbox\Core\Unity\"></file>
<file src="src\Utils\**\*.cs" exclude="**\Properties\AssemblyInfo.cs" target="content\sdkproject\Assets\Mapbox\Core\Utils\"></file>
<!--
<file src="????\link.xml" target="content\sdkproject\Assets\Mapbox\Assets\Plugins\"></file>
Expand Down
6 changes: 0 additions & 6 deletions MapboxSDKUnityCore.sln → MapboxSdkCs.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Platform", "src\Platform\Pl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Geocoding", "src\Geocoding\Geocoding.csproj", "{89F8BAB2-2E7A-425E-B715-2CC4519D561F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity", "src\Unity\Unity.csproj", "{24CA1FB8-BE9B-46ED-8E09-3767505128B6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Directions", "src\Directions\Directions.csproj", "{08214364-755E-4D6F-B7FF-9D2D49011C20}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono", "src\Mono\Mono.csproj", "{346B1208-1587-490B-A7DE-A96B86E81CD6}"
Expand Down Expand Up @@ -38,10 +36,6 @@ Global
{89F8BAB2-2E7A-425E-B715-2CC4519D561F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89F8BAB2-2E7A-425E-B715-2CC4519D561F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89F8BAB2-2E7A-425E-B715-2CC4519D561F}.Release|Any CPU.Build.0 = Release|Any CPU
{24CA1FB8-BE9B-46ED-8E09-3767505128B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24CA1FB8-BE9B-46ED-8E09-3767505128B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24CA1FB8-BE9B-46ED-8E09-3767505128B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24CA1FB8-BE9B-46ED-8E09-3767505128B6}.Release|Any CPU.Build.0 = Release|Any CPU
{08214364-755E-4D6F-B7FF-9D2D49011C20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08214364-755E-4D6F-B7FF-9D2D49011C20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08214364-755E-4D6F-B7FF-9D2D49011C20}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# mapbox-sdk-unity-core
# mapbox-sdk-cs

Tools for using Mapbox APIs with C# / Unity. If you'd like to contribute to the project, [read CONTRIBUTING.md](https://github.com/mapbox/mapbox-sdk-unity-core/blob/master/CONTRIBUTING.md).
Tools for using Mapbox with Unity.
SDK for using Mapbox APIs with C#. If you'd like to contribute to the project, [read CONTRIBUTING.md](https://github.com/mapbox/mapbox-sdk-cs/blob/master/CONTRIBUTING.md).


`master` branch build status: [![Build status](https://ci.appveyor.com/api/projects/status/mh7ad8p1qonkbnwr/branch/master?svg=true)](https://ci.appveyor.com/project/Mapbox/mapbox-sdk-unity-core/branch/master)
`master` branch code coverage: [![Coverage Status](https://coveralls.io/repos/github/mapbox/mapbox-sdk-unity-core/badge.svg?branch=master&t=jR0cza)](https://coveralls.io/github/mapbox/mapbox-sdk-unity-core?branch=master)
`master` branch build status: [![Build status](https://ci.appveyor.com/api/projects/status/mh7ad8p1qonkbnwr/branch/master?svg=true)](https://ci.appveyor.com/project/Mapbox/mapbox-sdk-cs/branch/master)
`master` branch code coverage: [![Coverage Status](https://coveralls.io/repos/github/mapbox/mapbox-sdk-cs/badge.svg?branch=master&t=jR0cza)](https://coveralls.io/github/mapbox/mapbox-sdk-cs?branch=master)

## Build

You need to have `Unity` installed for a successful build.

With an IDE:
* Open `MapboxSDKUnity.sln` with Visual Studio or Xamarin Studio
* Open `MapboxSdkCs.sln` with Visual Studio or Xamarin Studio
* `Build -> Rebuild Solution`
* DLLs will be in `bin`

On the command line:
* `nuget restore MapboxSDKUnity.sln`
* Windows: `msbuild MapboxSDKUnity.sln`
* Linux/OSX: `xbuild MapboxSDKUnity.sln`
* `nuget restore MapboxSdkCs.sln`
* Windows: `msbuild MapboxSdkCs.sln`
* Linux/OSX: `xbuild MapboxSdkCs.sln`
* DLLs will be in `bin`

## Tests
Expand All @@ -42,7 +39,7 @@ Log into your Mapbox account at https://www.mapbox.com/studio to obtain an acces
* Tag the commit with the `nupkg` version
* Push.
* AppVeyor build will publish to nuget.org
* Verify the build itself and publishing finished successfully: https://ci.appveyor.com/project/Mapbox/mapbox-sdk-unity-core
* Verify the build itself and publishing finished successfully: https://ci.appveyor.com/project/Mapbox/mapbox-sdk-cs

### Publishing Docs

Expand All @@ -52,8 +49,8 @@ Log into your Mapbox account at https://www.mapbox.com/studio to obtain an acces
* Push
* AppVeyor build will publish to `gh-pages`
* Verify the build itself and publishing finished successfully:
* https://ci.appveyor.com/project/Mapbox/mapbox-sdk-unity-core
* https://mapbox.github.io/mapbox-sdk-unity-core/
* https://ci.appveyor.com/project/Mapbox/mapbox-sdk-cs
* https://mapbox.github.io/mapbox-sdk-cs/

### Publishing locally (currently Windows only)

Expand Down
7 changes: 1 addition & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ init:
shallow_clone: true


install:
- powershell Invoke-WebRequest "https://mapbox.s3.amazonaws.com/windows-builds/windows-build-deps/Unity-Managed.7z" -OutFile um.7z
- 7z -y x um.7z -o"C:\Program Files\Unity\Editor\Data\" | %windir%\system32\FIND "ing archive"

platform: Any CPU
configuration:
- Debug
Expand Down Expand Up @@ -68,8 +64,7 @@ after_test:
/file:bin\%configuration%\Mapbox.Geocoding.dll ^
/file:bin\%configuration%\Mapbox.Map.dll ^
/file:bin\%configuration%\Mapbox.Platform.dll ^
/file:bin\%configuration%\Mapbox.Utils.dll ^
/reference:"C:\Program Files\Unity\Editor\Data\Managed\UnityEngine.dll"
/file:bin\%configuration%\Mapbox.Utils.dll
##http://help.appveyor.com/discussions/kb/9-support-for-stylecop-report#comment_34865295
##http://help.appveyor.com/discussions/kb/5-code-analysis-fxcop-support
##levels: Informational, Warning, Error, CriticalWarning, CriticalError
Expand Down
2 changes: 1 addition & 1 deletion docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"src": [
{
"files": [
"MapboxSDKUnity.sln"
"MapboxSdkCs.sln"
],
"exclude": [
"**/obj/**",
Expand Down
102 changes: 0 additions & 102 deletions scope.md

This file was deleted.

23 changes: 17 additions & 6 deletions scripts/build.csx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ using System.IO;
using System.Text;
using System.Text.RegularExpressions;

string access_token = Environment.GetEnvironmentVariable("MAPBOX_ACCESS_TOKEN");
if(string.IsNullOrWhiteSpace(access_token)){
Console.Error.WriteLine("%MAPBOX_ACCESS_TOKEN% not set - cannot run tests");
Environment.Exit(1);
}

//ATTENTION: latest version of `srciptcs` seems to change the current directory
string rootDir = Environment.GetEnvironmentVariable("ROOTDIR");
Console.WriteLine("rootDir [build.csx]: {0}", rootDir);
Console.WriteLine("cwd [build.csx]: {0}", Directory.GetCurrentDirectory());
Directory.SetCurrentDirectory(rootDir);
Console.WriteLine("cwd [build.csx]: {0}", Directory.GetCurrentDirectory());
string commitMessage = Environment.GetEnvironmentVariable("APPVEYOR_REPO_COMMIT_MESSAGE");
Console.WriteLine("commit message: \"{0}\"", commitMessage);

Expand Down Expand Up @@ -41,6 +53,7 @@ if (publishDocs)
string versionDLL;
string versionNupkg;


using (TextReader tr = new StreamReader("versions.txt"))
{
versionDLL = tr.ReadLine().Split(":".ToCharArray())[1].Trim();
Expand All @@ -54,8 +67,6 @@ Console.WriteLine(" - DLLs : {0}", versionDLL);
Console.WriteLine(" - nupkg : {0}", versionNupkg);


string rootDir = Environment.GetEnvironmentVariable("ROOTDIR");

//////// PATCH SharedAssemblyInfo.cs
string sharedAssemblyInfo = Path.Combine(
rootDir
Expand Down Expand Up @@ -83,7 +94,7 @@ using (TextWriter tw = new StreamWriter(sharedAssemblyInfo, false, Encoding.UTF8


string buildCmd = string.Format(
"msbuild MapboxSDKUnityCore.sln /p:Configuration={0}",
"msbuild MapboxSdkCs.sln /p:Configuration={0}",
configuration
);
Console.WriteLine("building [{0}]", buildCmd);
Expand Down Expand Up @@ -112,7 +123,7 @@ if (!publishNuget)
else
{
Console.WriteLine("publishing to nuget.org");
string nugetCmd = string.Format("nuget push MapboxSDKforUnityCore.{0}.nupkg {1} -Source https://www.nuget.org/api/v2/package", versionNupkg, nugetApiKey);
string nugetCmd = string.Format("nuget push MapboxSdkCs.{0}.nupkg {1} -Source https://www.nuget.org/api/v2/package", versionNupkg, nugetApiKey);
if (!RunCommand(nugetCmd))
{
Console.Error.WriteLine("publishing to nuget.org failed");
Expand All @@ -137,7 +148,7 @@ else
}
else
{
originalCommit = "https://github.com/mapbox/mapbox-sdk-unity-core/commit/" + originalCommit;
originalCommit = "https://github.com/mapbox/mapbox-sdk-cs/commit/" + originalCommit;
}

string commitAuthor = Environment.GetEnvironmentVariable("APPVEYOR_REPO_COMMIT_AUTHOR");
Expand All @@ -154,7 +165,7 @@ else
"git init .",
"git add .",
string.Format("git commit -m \"pushed via [{0}] by [{1}]\"", originalCommit,commitAuthor),
string.Format("git remote add origin https://{0}@github.com/mapbox/mapbox-sdk-unity.git", githubToken),
string.Format("git remote add origin https://{0}@github.com/mapbox/mapbox-sdk-cs.git", githubToken),
"git checkout -b gh-pages",
"git push -f origin gh-pages"
});
Expand Down
Loading