| @@ -10,12 +10,12 @@ | |||
| <RepositoryUrl>git://github.com/RogueException/Discord.Net</RepositoryUrl> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(BuildNumber)' == '' "> | |||
| <VersionSuffix Condition=" '$(VersionSuffix)' == ''">dev</VersionSuffix> | |||
| <VersionSuffix Condition=" '$(VersionSuffix)' != ''">$(VersionSuffix)-dev</VersionSuffix> | |||
| <VersionSuffix Condition=" '$(VersionSuffix)' == ''">dev</VersionSuffix> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(BuildNumber)' != '' And $(IsTagBuild) != 'true' "> | |||
| <VersionSuffix Condition=" '$(VersionSuffix)' == '' ">$(BuildNumber)</VersionSuffix> | |||
| <VersionSuffix Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix> | |||
| <VersionSuffix Condition=" '$(VersionSuffix)' == '' ">build-$(BuildNumber)</VersionSuffix> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' Or '$(TargetFramework)' == 'net45' "> | |||
| <DefineConstants>$(DefineConstants);FILESYSTEM;DEFAULTUDPCLIENT;DEFAULTWEBSOCKET</DefineConstants> | |||
| @@ -14,14 +14,13 @@ Our stable builds available from NuGet through the Discord.Net metapackage: | |||
| - [Discord.Net](https://www.nuget.org/packages/Discord.Net/) | |||
| The individual components may also be installed from NuGet: | |||
| - [Discord.Net.Commands](https://www.nuget.org/packages/Discord.Net.Commands/) | |||
| - [Discord.Net.Rest](https://www.nuget.org/packages/Discord.Net.Rest/) | |||
| - [Discord.Net.Rpc](https://www.nuget.org/packages/Discord.Net.Rpc/) | |||
| - [Discord.Net.WebSocket](https://www.nuget.org/packages/Discord.Net.WebSocket/) | |||
| - [Discord.Net.Webhook](https://www.nuget.org/packages/Discord.Net.Webhook/) | |||
| - [Discord.Net.Commands](https://www.nuget.org/packages/Discord.Net.Commands/) | |||
| The following providers are available for platforms not supporting .NET Standard 1.3: | |||
| - [Discord.Net.Providers.UdpClient](https://www.nuget.org/packages/Discord.Net.Providers.UdpClient/) | |||
| The following provider is available for platforms not supporting .NET Standard 1.3: | |||
| - [Discord.Net.Providers.WS4Net](https://www.nuget.org/packages/Discord.Net.Providers.WS4Net/) | |||
| ### Unstable (MyGet) | |||
| @@ -0,0 +1,55 @@ | |||
| version: build-{build} | |||
| branches: | |||
| only: | |||
| - dev | |||
| image: Visual Studio 2017 | |||
| nuget: | |||
| disable_publish_on_pr: true | |||
| pull_requests: | |||
| do_not_increment_build_number: true | |||
| clone_folder: C:\Projects\Discord.Net | |||
| cache: test/Discord.Net.Tests/cache.db | |||
| environment: | |||
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |||
| DNET_TEST_TOKEN: | |||
| secure: l7h5e7UE7yRd70hAB97kjPiQpPOShwqoBbOzEAYQ+XBd/Pre5OA33IXa3uisdUeQJP/nPFhcOsI+yn7WpuFaoQ== | |||
| DNET_TEST_GUILDID: 273160668180381696 | |||
| init: | |||
| - ps: $Env:BUILD = "$($Env:APPVEYOR_BUILD_NUMBER.PadLeft(5, "0"))" | |||
| build_script: | |||
| - ps: appveyor-retry dotnet restore Discord.Net.sln -v Minimal /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: dotnet build Discord.Net.sln -c "Release" /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: dotnet pack "src\Discord.Net.Rest\Discord.Net.Rest.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: dotnet pack "src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: dotnet pack "src\Discord.Net.Rpc\Discord.Net.Rpc.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: dotnet pack "src\Discord.Net.Commands\Discord.Net.Commands.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: dotnet pack "src\Discord.Net.Webhook\Discord.Net.Webhook.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: dotnet pack "src\Discord.Net.Providers.WS4Net\Discord.Net.Providers.WS4Net.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| - ps: >- | |||
| if ($Env:APPVEYOR_REPO_TAG -eq "true") { | |||
| nuget pack src\Discord.Net\Discord.Net.nuspec -OutputDirectory "artifacts" -properties suffix="" | |||
| } else { | |||
| nuget pack src\Discord.Net\Discord.Net.nuspec -OutputDirectory "artifacts" -properties suffix="-$Env:BUILD" | |||
| } | |||
| test_script: | |||
| - ps: >- | |||
| if ($APPVEYOR_PULL_REQUEST_NUMBER -ne "") { | |||
| dotnet test test/Discord.Net.Tests/Discord.Net.Tests.csproj -c "Release" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| } | |||
| artifacts: | |||
| - path: artifacts/*.nupkg | |||
| name: MyGet | |||
| deploy: | |||
| - provider: NuGet | |||
| server: https://www.myget.org/F/discord-net/api/v2/package | |||
| api_key: | |||
| secure: Jl7BXeUjRnkVHDMBuUWSXcEOkrli1PBleW2IiLyUs5j63UNUNp1hcjaUJRujx9lz | |||
| symbol_server: https://www.myget.org/F/discord-net/symbols/api/v2/package | |||
| artifact: MyGet | |||
| on: | |||
| branch: dev | |||
| @@ -1,4 +0,0 @@ | |||
| appveyor-retry dotnet restore Discord.Net.sln -v Minimal /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| dotnet build Discord.Net.sln -c "Release" /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| @@ -1,22 +0,0 @@ | |||
| dotnet pack "src\Discord.Net.Core\Discord.Net.Core.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| dotnet pack "src\Discord.Net.Rest\Discord.Net.Rest.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| dotnet pack "src\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| dotnet pack "src\Discord.Net.Rpc\Discord.Net.Rpc.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| dotnet pack "src\Discord.Net.Commands\Discord.Net.Commands.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| dotnet pack "src\Discord.Net.Webhook\Discord.Net.Webhook.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| dotnet pack "src\Discord.Net.Providers.WS4Net\Discord.Net.Providers.WS4Net.csproj" -c "Release" -o "../../artifacts" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| if ($Env:APPVEYOR_REPO_TAG -eq "true") { | |||
| nuget pack src\Discord.Net\Discord.Net.nuspec -OutputDirectory "artifacts" -properties suffix="" | |||
| } | |||
| else { | |||
| nuget pack src\Discord.Net\Discord.Net.nuspec -OutputDirectory "artifacts" -properties suffix="-$Env:BUILD" | |||
| } | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||
| @@ -1,2 +0,0 @@ | |||
| dotnet test test/Discord.Net.Tests/Discord.Net.Tests.csproj -c "Release" --no-build /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG" | |||
| if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } | |||