Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target .NET Core 2.0, enable SourceLink #38

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 3 additions & 71 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,13 @@
# Great reference: http://www.appveyor.com/docs/appveyor-yml

version: 1.0.{build}
skip_tags: false
configuration: Release
init:
- ps: >-
$parsedReleaseBuildVersion = $env:APPVEYOR_REPO_TAG_NAME -Match "(\d+.\d+.\d+(.\d+)?)"

If($env:appveyor_repo_tag -AND $parsedReleaseBuildVersion) {
$env:BuildVersion = $matches[0]
$env:IsGithubRelease = $TRUE
}
else {
$env:BuildVersion = $env:appveyor_build_version
$env:IsGithubRelease = ""
}

Write-Host "Build Version: " $env:BuildVersion

Write-Host "appveyor_build_version Variable: " $env:appveyor_build_version

install:
- ps: >-
try
{
if($env:IsGithubRelease)
{
$origin = git config --get remote.origin.url
if ($origin -like "https://github.com/*.git")
{
$startToTrim = "https://github.com/"
$endToTrim = ".git"

$releaseUrl = $origin.Substring($startToTrim.Length, $origin.Length - $startToTrim.Length - $endToTrim.Length)

$releaseUrl = "https://api.github.com/repos/" + $releaseUrl + "/releases/tags/" + $env:APPVEYOR_REPO_TAG_NAME

$resp = invoke-webrequest $releaseUrl
$release = $resp.Content | ConvertFrom-Json

$nuspecPath = (Get-ChildItem -Filter *.nuspec -Recurse )[0].FullName
[xml]$nuspec = Get-Content $nuspecPath

$nuspec.package.metadata.releaseNotes = $release.Body
$nuspec.Save( $nuspecPath )
}
}
}
catch
{
Write-Host $_.Exception.GetType().FullName, $_.Exception.Message
}
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: $(BuildVersion)
assembly_file_version: $(BuildVersion)
assembly_informational_version: $(BuildVersion)
nuget:
account_feed: true
project_feed: true
before_build:
- cmd: choco install wget
- wget -q https://download.microsoft.com/download/8/F/9/8F9659B9-E628-4D1A-B6BF-C3004C8C954B/dotnet-1.1.1-sdk-win-x64.exe
- dotnet-1.1.1-sdk-win-x64.exe /install /quiet /log dotnetinstall.log
- ps: Push-AppveyorArtifact "dotnetinstall.log"
build_script:
- nuget restore source\MasterDevs.ChromeDevTools.sln
- dotnet restore source\ChromeDevTools\MasterDevs.ChromeDevTools.Core.csproj
- dotnet pack source\ChromeDevTools\MasterDevs.ChromeDevTools.Core.csproj --version-suffix r%APPVEYOR_BUILD_NUMBER%
build:
project: source\MasterDevs.ChromeDevTools.sln
publish_nuget: true
publish_nuget_symbols: false
verbosity: minimal
- dotnet pack source\ChromeDevTools\MasterDevs.ChromeDevTools.Core.csproj -c Release
artifacts:
- path: '*.nupkg'
- path: 'source\ChromeDevTools\bin\Release\*.nupkg'
- path: 'source\ChromeDevTools\bin\Release\*.snupkg'
deploy:
- provider: GitHub
auth_token:
Expand Down
25 changes: 25 additions & 0 deletions source/ChromeDevTools.Core.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.9
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MasterDevs.ChromeDevTools.Core", "ChromeDevTools\MasterDevs.ChromeDevTools.Core.csproj", "{FB3B025A-8F5A-4245-8F9F-6F2C977A3136}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FB3B025A-8F5A-4245-8F9F-6F2C977A3136}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB3B025A-8F5A-4245-8F9F-6F2C977A3136}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FB3B025A-8F5A-4245-8F9F-6F2C977A3136}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FB3B025A-8F5A-4245-8F9F-6F2C977A3136}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {654C75D2-8EB8-44A1-8072-878E8EF8E460}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion source/ChromeDevTools/ChromeSession.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !NETSTANDARD1_5
#if !NETSTANDARD
using MasterDevs.ChromeDevTools.Serialization;
using Newtonsoft.Json;
using System;
Expand Down
2 changes: 1 addition & 1 deletion source/ChromeDevTools/ChromeSessionFactory.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !NETSTANDARD1_5
#if !NETSTANDARD
namespace MasterDevs.ChromeDevTools
{
public class ChromeSessionFactory : IChromeSessionFactory
Expand Down
19 changes: 13 additions & 6 deletions source/ChromeDevTools/MasterDevs.ChromeDevTools.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.5</TargetFramework>
<TargetFrameworks>netstandard1.5;net45</TargetFrameworks>
<VersionPrefix>1.0.3</VersionPrefix>
<TargetFrameworks>netstandard2.0;netstandard1.5;net45</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

<RootNamespace>MasterDevs.ChromeDevTools</RootNamespace>
<AssemblyName>MasterDevs.ChromeDevTools</AssemblyName>

<Authors>MasterDevs</Authors>
<Company>MasterDevs</Company>
<Product>MasterDevs.ChromeWebTools</Product>
<Copyright>Copyright © 2015 MasterDevs</Copyright>
<Description>Contains the classes and utilities used to interact with the Chrome Developer Tools</Description>
<PackageProjectUrl>https://github.com/MasterDevs/ChromeDevTools</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/MasterDevs/ChromeDevTools/blob/master/LICENSE</PackageLicenseUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>http://masterdevs.com/images/FavIcon_144.png</PackageIconUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>MasterDevs.ChromeDevTools.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.0" />
<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.167" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19270-01" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.5'">
<PackageReference Include="System.Net.Http" Version="4.3.0" />
<PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="System.Runtime" Version="4.3.0" />
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
Expand All @@ -36,6 +41,8 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<PackageReference Include="System.Net.Http" Version="4.3.0" />
<PackageReference Include="WebSocket4Net" Version="0.14.1" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
</Project>
10 changes: 0 additions & 10 deletions source/ChromeDevTools/MasterDevs.ChromeDevTools.project.json

This file was deleted.

27 changes: 0 additions & 27 deletions source/ChromeDevTools/Properties/AssemblyInfo.cs

This file was deleted.

7 changes: 7 additions & 0 deletions source/version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.1",
"publicReleaseRefSpec": [
"^refs/heads/master$",
],
}