Skip to content

Commit

Permalink
Enable upload NuGet Preview by using GitVersion, enable sourcelink, b…
Browse files Browse the repository at this point in the history
…uild symbol package (#81)
  • Loading branch information
jetersen committed Oct 29, 2019
1 parent 82d8ad3 commit d8c297a
Show file tree
Hide file tree
Showing 95 changed files with 121 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
root = true
root = true

[*]
# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#end_of_line
Expand Down
2 changes: 1 addition & 1 deletion GitLabApiClient.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29324.140
Expand Down
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<activePackageSource>
<add key="NuGet official package source" value="https://nuget.org/api/v2/" />
</activePackageSource>
</configuration>
</configuration>
29 changes: 15 additions & 14 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
image: Visual Studio 2019
version: 1.0.{build}-alpha
configuration: Release
build:
verbosity: minimal
Expand All @@ -10,26 +9,28 @@ environment:

skip_branch_with_pr: true

before_build:
- ps: cinst -y codecov --no-progress
install:
- ps: dotnet tool install -g Codecov.Tool
- ps: dotnet tool install -g GitVersion.Tool
- ps: dotnet tool install -g dotnet-format

before_build:
- ps: dotnet format --check --dry-run
- ps: dotnet gitversion /l console /output buildserver

build_script:
- ps: .\build.ps1
- ps: .\build.ps1

test_script:
- ps: .\test.ps1
- ps: .\test.ps1

artifacts:
- path: 'src\bin\Release\*.nupkg'
name: Package
- path: 'src\**\Release\*.nupkg'
name: NuGet Packages
- path: 'src\**\Release\*.snupkg'
name: NuGet Symbol Packages

deploy:
provider: NuGet
api_key:
secure: nsG5rMfSr/gLzEdOpIEAj7p0n2LKQrjO1hHR4C+kFyuQXBC8KlcAJrjgP5vnm1XA
skip_symbols: false
artifact: /.*\.nupkg/
on:
appveyor_repo_tag: true
- provider: NuGet
api_key:
secure: nsG5rMfSr/gLzEdOpIEAj7p0n2LKQrjO1hHR4C+kFyuQXBC8KlcAJrjgP5vnm1XA
11 changes: 3 additions & 8 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Build()
{
exit 1
}

& dotnet build src\GitLabApiClient\GitLabApiClient.csproj | Write-Host
if ($LastExitCode -ne 0)
{
Expand All @@ -21,12 +21,7 @@ function Build()

function Pack()
{
$packageVersion = "$env:APPVEYOR_REPO_TAG_NAME"
if (!$packageVersion) {
return
}

& dotnet pack src\GitLabApiClient\GitLabApiClient.csproj -c Release --no-build -p:PackageVersion=$packageVersion | Write-Host
& dotnet pack src\GitLabApiClient\GitLabApiClient.csproj -c Release --no-build | Write-Host
if ($LastExitCode -ne 0)
{
exit 1
Expand All @@ -39,4 +34,4 @@ function Main()
Pack
}

Main
Main
2 changes: 1 addition & 1 deletion docker/authentication_token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ do
echo "Unable to update root authentication_token retry in 30s"
sleep 15
fi
done
done
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ services:
volumes:
- './volumes/config:/etc/gitlab'
- './volumes/logs:/var/log/gitlab'
- './volumes/data:/var/opt/gitlab'
- './volumes/data:/var/opt/gitlab'
2 changes: 1 addition & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

sh ./authentication_token.sh &
sh ./test_setup.sh &
/assets/wrapper
/assets/wrapper
2 changes: 1 addition & 1 deletion src/GitLabApiClient/BranchClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using GitLabApiClient.Internal.Http;
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/CommitsClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using GitLabApiClient.Internal.Http;
Expand Down
33 changes: 11 additions & 22 deletions src/GitLabApiClient/GitLabApiClient.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks Condition="'$(OS)' != 'Unix'">netstandard2.0;net452</TargetFrameworks>
Expand All @@ -8,40 +8,29 @@
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<Copyright/>
<Copyright />
<Description>GitLabApiClient is a .NET rest client for GitLab API v4.</Description>
<Authors>nmklotas</Authors>
<PackageProjectUrl>https://github.com/nmklotas/GitLabApiClient</PackageProjectUrl>
<RepositoryUrl>https://github.com/nmklotas/GitLabApiClient</RepositoryUrl>
<RepositoryType/>
<RepositoryType />
<PackageTags>GitLab REST API CI Client</PackageTags>
<PackageId>GitLabApiClient</PackageId>
<Company>nmklotas</Company>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\bin\Debug\</OutputPath>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<DocumentationFile>..\bin\Debug\netstandard2.0\GitLabApiClient.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\bin\Release\</OutputPath>
<DocumentationFile>..\bin\Release\netstandard2.0\GitLabApiClient.xml</DocumentationFile>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<NoWarn>1701;1702;1705;1591</NoWarn>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.3"/>
<PackageReference Include="GitVersionTask" Version="5.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<Reference Include="System.Net.Http"/>
<Reference Include="System.Web"/>
<Reference Include="System.Net.Http" />
<Reference Include="System.Web" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/GitLabApiClient/GitLabException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net;

namespace GitLabApiClient
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/GroupsClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("GitLabApiClient.Test")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/Http/GitLabHttpFacade.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/Http/GitlabApiRequestor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Globalization;
using System.IO;
using System.Net.Http;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections;
using System.Reflection;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Newtonsoft.Json;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace GitLabApiClient.Internal.Http.Serialization
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/Queries/BranchQueryBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GitLabApiClient.Models.Branches.Requests;
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/Queries/CommitQueryBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GitLabApiClient.Internal.Utilities;
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/Queries/QueryBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GitLabApiClient.Models.Releases.Requests;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;

Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/Queries/TagQueryBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GitLabApiClient.Models.Tags.Requests;
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/Utilities/Extensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Web;
using System.Web;

namespace GitLabApiClient.Internal.Utilities
{
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Internal/Utilities/Guard.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/MarkdownClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using GitLabApiClient.Internal.Http;
using GitLabApiClient.Models.Markdown.Request;
using GitLabApiClient.Models.Markdown.Response;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GitLabApiClient.Internal.Utilities;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GitLabApiClient.Internal.Utilities;
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Models/Branches/Responses/Branch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GitLabApiClient.Models.Releases.Responses;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;

Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Models/Commits/Responses/Commit.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using GitLabApiClient.Models.Releases.Responses;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using GitLabApiClient.Internal.Utilities;
using GitLabApiClient.Internal.Utilities;
using Newtonsoft.Json;
namespace GitLabApiClient.Models.Groups.Requests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using GitLabApiClient.Internal.Utilities;
using GitLabApiClient.Internal.Utilities;
using Newtonsoft.Json;

namespace GitLabApiClient.Models.Groups.Requests
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Models/Groups/Requests/GroupsOrder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.Serialization;
using System.Runtime.Serialization;

namespace GitLabApiClient.Models.Groups.Requests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.Serialization;
using System.Runtime.Serialization;

namespace GitLabApiClient.Models.Groups.Requests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;

namespace GitLabApiClient.Models.Groups.Requests
{
Expand Down
2 changes: 1 addition & 1 deletion src/GitLabApiClient/Models/Groups/Requests/GroupsSort.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.Serialization;
using System.Runtime.Serialization;

namespace GitLabApiClient.Models.Groups.Requests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.Serialization;
using System.Runtime.Serialization;

namespace GitLabApiClient.Models.Groups.Requests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace GitLabApiClient.Models.Groups.Requests
namespace GitLabApiClient.Models.Groups.Requests
{
/// <summary>
/// Options for Groups listing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using GitLabApiClient.Internal.Utilities;
using GitLabApiClient.Internal.Utilities;
using Newtonsoft.Json;

namespace GitLabApiClient.Models.Groups.Requests
Expand Down
Loading

0 comments on commit d8c297a

Please sign in to comment.