diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index c49401b..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: microsoft/dotnet:1.1-sdk - steps: - - checkout - - run: dotnet test -f netcoreapp1.1 -c Release test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj - build: - docker: - - image: microsoft/dotnet:2.2-sdk - steps: - - checkout - - run: dotnet test -f netcoreapp2.2 -c Release test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj - diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3fed5d5 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +charset = utf-8 +end_of_line = crlf +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.cs] +indent_size = 4 + +[*.{csproj,xml,json}] +indent_size = 2 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d193e94..6baec73 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,15 +1,8 @@ version: 2 updates: -- package-ecosystem: nuget - directory: "/" - schedule: - interval: daily - time: "04:00" - open-pull-requests-limit: 10 - ignore: - - dependency-name: coverlet.msbuild - versions: - - 3.0.2 - - dependency-name: Microsoft.NET.Test.Sdk - versions: - - 16.8.3 + - package-ecosystem: nuget + directory: "/" + schedule: + interval: daily + time: "04:00" + open-pull-requests-limit: 10 diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..c13c7ee --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,118 @@ +name: CI +env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: Build and test + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup dotnet 6.0 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "6.0.x" + + - name: Setup dotnet 5.0 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "5.0.x" + + - name: Setup dotnet 3.1 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "3.1.x" + + - name: Restore + run: dotnet restore + + - name: Build + run: dotnet build -c Release --no-restore + + - name: Test .NET Framework 4.8 + run: dotnet test -c Release -f net48 -r ./artifacts -l trx --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[xunit.*]* + + - name: Test .NET Core 3.1 + run: dotnet test -c Release -f netcoreapp3.1 -r ./artifacts -l trx --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[xunit.*]* + + - name: Test .NET 5 + run: dotnet test -c Release -f net5 -r ./artifacts -l trx --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[xunit.*]* + + - name: Test .NET 6 + run: dotnet test -c Release -f net6 -r ./artifacts -l trx --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=[xunit.*]* + + - name: Upload code coverage + uses: codecov/codecov-action@v2 + with: + files: ./test/BinaryEncoding.Tests/coverage.net48.opencover.xml,./test/BinaryEncoding.Tests/coverage.netcoreapp31.opencover.xml,./test/BinaryEncoding.Tests/coverage.net5.opencover.xml,./test/BinaryEncoding.Tests/coverage.net6.opencover.xml + flags: unittests # optional + name: codecov-umbrella # optional + fail_ci_if_error: true # optional (default = false) + verbose: true # optional (default = false) + + calc-version: + name: Calculate version + runs-on: ubuntu-latest + needs: + - build + outputs: + version: ${{ steps.nbgv.outputs.SemVer2 }} + prerelease: ${{ github.base_ref != 'refs/heads/master' }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: dotnet/nbgv@master + id: nbgv + + publish: + name: Pack and Publish + runs-on: ubuntu-latest + needs: + - calc-version + steps: + - name: Version Output Check + run: | + echo "${{ needs.calc-version.outputs.version }} - ${{ needs.calc-version.outputs.prerelease }}" + + # - name: Checkout + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + + # - name: Setup dotnet 6.0 + # uses: actions/setup-dotnet@v1 + # with: + # dotnet-version: "6.0.x" + + # - name: Build and Publish to NuGet + # uses: drusellers/publish-nuget@master + # with: + # project-file-path: src/BinaryEncoding/BinaryEncoding.csproj + # version: ${{ needs.calc-version.outputs.version }} + # tag-commit: true + # tag-format: v* + # nuget-key: ${{secrets.NUGET_API_KEY}} + # include-symbols: true + + # - name: Create release + # uses: "marvinpinto/action-automatic-releases@v1.2.1" + # with: + # repo_token: "${{ secrets.GITHUB_TOKEN }}" + # prerelease: ${{ needs.calc-version.outputs.prerelease }} + # files: | + # *.nupkg diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0f7d049..0000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: csharp -solution: BinaryEncoding.sln - -sudo: required -dist: xenial -mono: latest -dotnet: 2.2.300 - -os: - - linux - - osx - -notifications: - email: - on_success: change - on_failure: always - -branches: - only: - - master - -cache: - bundler: true - directories: - - ./packages - - /.dotnetcli - - $HOME/.nuget/packages - - $HOME/Library/Caches/Homebrew - -before_install: - - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi - -install: - - git config --global core.autocrlf input - -script: - - dotnet build -c Release - - dotnet test -c Release -f netcoreapp2.2 --no-build --no-restore --blame - - mono $HOME/.nuget/packages/xunit.runner.console/*/tools/net452/xunit.console.exe ./test/BinaryEncoding.Tests/bin/Release/net452/BinaryEncoding.Tests.dll diff --git a/BinaryEncoding.sln b/BinaryEncoding.sln index ac8a254..96dd189 100644 --- a/BinaryEncoding.sln +++ b/BinaryEncoding.sln @@ -1,15 +1,21 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26403.7 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31808.319 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B40D7F8C-AC59-4C28-954C-B73B01771D66}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BinaryEncoding", "src\BinaryEncoding\BinaryEncoding.csproj", "{4FE3B85C-8F9B-489F-9AF2-5928842540E8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{863CE3AB-B945-45DD-B9F4-CED015E4FBC7}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BinaryEncoding.Tests", "test\BinaryEncoding.Tests\BinaryEncoding.Tests.csproj", "{571EF7FA-9AC3-4059-884C-CEAFE9B2279A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AE44A53-6DC2-4F0A-88CC-F80220044559}" + ProjectSection(SolutionItems) = preProject + .gitattributes = .gitattributes + .gitignore = .gitignore + Directory.Build.props = Directory.Build.props + LICENSE = LICENSE + NuGet.config = NuGet.config + README.md = README.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,8 +55,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {4FE3B85C-8F9B-489F-9AF2-5928842540E8} = {B40D7F8C-AC59-4C28-954C-B73B01771D66} - {571EF7FA-9AC3-4059-884C-CEAFE9B2279A} = {863CE3AB-B945-45DD-B9F4-CED015E4FBC7} + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F4BD0191-ED63-49B2-A956-FE3111D5E1AA} EndGlobalSection EndGlobal diff --git a/Directory.Build.props b/Directory.Build.props index 890649a..1f59054 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,28 +1,7 @@ - + - - - true - - - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono - /usr/lib/mono - /usr/local/lib/mono - - - $(BaseFrameworkPathOverrideForMono)/4.5-api - $(BaseFrameworkPathOverrideForMono)/4.5.1-api - $(BaseFrameworkPathOverrideForMono)/4.5.2-api - $(BaseFrameworkPathOverrideForMono)/4.6-api - $(BaseFrameworkPathOverrideForMono)/4.6.1-api - $(BaseFrameworkPathOverrideForMono)/4.6.2-api - $(BaseFrameworkPathOverrideForMono)/4.7-api - $(BaseFrameworkPathOverrideForMono)/4.7.1-api - $(BaseFrameworkPathOverrideForMono)/4.7.2-api - true - - - {RawFileName};{CandidateAssemblyFiles};{HintPathFromItem};$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths) - $(BaseFrameworkPathOverrideForMono)/4.5;$(BaseFrameworkPathOverrideForMono)/4.5/Facades;$(AssemblySearchPaths) + latest + enable + true diff --git a/NuGet.config b/NuGet.config index bcee4a6..78a3297 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,7 +2,6 @@ - diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 99445eb..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,95 +0,0 @@ -environment: - PKG_VERSION: 1.5.0 - VERSION_SUFFIX: "" -version: ${PKG_VERSION}-{build} -configuration: Release -platform: x64 -image: Visual Studio 2017 - -skip_commits: - message: /chore/ - files: - - '**\*.md' - - LICENSE - -skip_branch_with_pr: true - -branches: - only: - - master - -matrix: - fast_finish: true - -init: - - git config --global core.autocrlf input - - ps: $env:BUILD_VERSION = "$env:PKG_VERSION-$env:APPVEYOR_BUILD_NUMBER" - - ps: | - if ($env:APPVEYOR_REPO_BRANCH -eq "master") - { - $env:VERSION_SUFFIX = "" - $env:NUGET_VERSION = "$env:PKG_VERSION" - } - else - { - $env:VERSION_SUFFIX = "beta$env:APPVEYOR_BUILD_NUMBER" - $env:NUGET_VERSION = "$env:PKG_VERSION-$env:VERSION_SUFFIX" - } - - ps: Update-AppveyorBuild -Version $env:BUILD_VERSION - - ps: Write-Host "Build version $env:BUILD_VERSION, NuGet version $env:NUGET_VERSION, Version suffix $env:VERSION_SUFFIX" - -build_script: - - ps: | - if ($env:APPVEYOR_REPO_BRANCH -eq "master") - { - dotnet build -c $env:CONFIGURATION - } - else - { - dotnet build -c $env:CONFIGURATION --version-suffix $env:VERSION_SUFFIX - } - -test: off - -test_script: - - dotnet test -c %CONFIGURATION% -f netcoreapp2.2 /p:CollectCoverage=true %APPVEYOR_BUILD_FOLDER%\test\BinaryEncoding.Tests - -on_success: - - choco install codecov - - codecov -f "%APPVEYOR_BUILD_FOLDER%\test\BinaryEncoding.Tests\coverage.opencover.xml" - -artifacts: - - path: '**\*.nupkg' - name: nupkg - - path: '**\*.snupkg' - name: snupkg - -cache: - - '%USERPROFILE%\.local' - - '%USERPROFILE%\.nuget\packages -> **\*.csproj' - - '%LocalAppData%\NuGet\Cache' - - '%LocalAppData%\Python' - - '.\packages -> **\*.csproj' - - '.\tools' - - '\Python34' - -nuget: - account_feed: true - -deploy: - - provider: NuGet - api_key: - secure: WcDqU36pLPvA+s5D4N0VEsi7AZGewvf4croE/D3rh3F+iqiztq9w5gHbrhgoTNS9 - on: - branch: master - appveyor_repo_tag: true - - provider: GitHub - description: 'Release description' - auth_token: - secure: nsZHZ5nFBFP4fZoVUEeWeZKx7LUASVqCZ+JblTox+02RfTAOlANdFWeCqOwhu7pk - artifact: /.*\.nupkg/ # upload all NuGet packages to release assets - draft: false - prerelease: false - on: - branch: master # release from master branch only - appveyor_repo_tag: true diff --git a/src/BinaryEncoding/Binary.BigEndian.cs b/src/BinaryEncoding/Binary.BigEndian.cs index 47dfd5f..bdd2184 100644 --- a/src/BinaryEncoding/Binary.BigEndian.cs +++ b/src/BinaryEncoding/Binary.BigEndian.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.CompilerServices; namespace BinaryEncoding @@ -102,7 +102,7 @@ public override int Set(long value, Span bytes) public override short GetInt16(byte[] bytes, int offset = 0) => GetInt16(bytes.AsSpan(offset)); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override ushort GetUInt16(ReadOnlySpan bytes) => (ushort) (bytes[1] | bytes[0] << 8); + public override ushort GetUInt16(ReadOnlySpan bytes) => (ushort)(bytes[1] | bytes[0] << 8); [MethodImpl(MethodImplOptions.AggressiveInlining)] public override ushort GetUInt16(byte[] bytes, int offset = 0) => GetUInt16(bytes.AsSpan(offset)); diff --git a/src/BinaryEncoding/Binary.EndianCodec.cs b/src/BinaryEncoding/Binary.EndianCodec.cs index 6d247aa..c92a383 100644 --- a/src/BinaryEncoding/Binary.EndianCodec.cs +++ b/src/BinaryEncoding/Binary.EndianCodec.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace BinaryEncoding { diff --git a/src/BinaryEncoding/Binary.Extensions.cs b/src/BinaryEncoding/Binary.Extensions.cs index bd25ca6..1e08636 100644 --- a/src/BinaryEncoding/Binary.Extensions.cs +++ b/src/BinaryEncoding/Binary.Extensions.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace BinaryEncoding { diff --git a/src/BinaryEncoding/Binary.LittleEndian.cs b/src/BinaryEncoding/Binary.LittleEndian.cs index ade5cce..b2486a4 100644 --- a/src/BinaryEncoding/Binary.LittleEndian.cs +++ b/src/BinaryEncoding/Binary.LittleEndian.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.CompilerServices; namespace BinaryEncoding diff --git a/src/BinaryEncoding/Binary.Stream.cs b/src/BinaryEncoding/Binary.Stream.cs index fbb541c..40419cb 100644 --- a/src/BinaryEncoding/Binary.Stream.cs +++ b/src/BinaryEncoding/Binary.Stream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Buffers; using System.Collections.Generic; using System.IO; @@ -14,6 +14,7 @@ public partial class Binary public abstract partial class EndianCodec { private static T Read(Stream stream, Func func) + where T : struct { if (stream == null) throw new ArgumentNullException(nameof(stream)); @@ -21,15 +22,11 @@ private static T Read(Stream stream, Func func) if (!stream.CanRead) throw new Exception("Stream is not readable"); -#if NETSTANDARD1_1 - var size = Marshal.SizeOf(typeof(T)); -#else var size = Marshal.SizeOf(); -#endif var buffer = ArrayPool.Shared.Rent(size); T result = default(T); try - { + { var bytesRead = stream.Read(buffer, 0, size); if (bytesRead <= 0) throw new EndOfStreamException(); @@ -47,6 +44,7 @@ private static T Read(Stream stream, Func func) } private static async Task ReadAsync(Stream stream, Func func, CancellationToken cancellationToken = default(CancellationToken)) + where T : struct { if (stream == null) throw new ArgumentNullException(nameof(stream)); @@ -54,11 +52,7 @@ private static T Read(Stream stream, Func func) if (!stream.CanRead) throw new Exception("Stream is not readable"); -#if NETSTANDARD1_1 - var size = Marshal.SizeOf(typeof(T)); -#else var size = Marshal.SizeOf(); -#endif var buffer = ArrayPool.Shared.Rent(size); T result = default(T); try @@ -107,6 +101,7 @@ private static T Read(Stream stream, Func func) public Task ReadUInt64Async(Stream stream, int count, CancellationToken cancellationToken = default(CancellationToken)) => Task.WhenAll(Enumerable.Range(0, count).Select(_ => ReadUInt64Async(stream, cancellationToken))); private static int Write(Stream stream, T value, Func func) + where T : struct { if (stream == null) throw new ArgumentNullException(nameof(stream)); @@ -114,11 +109,7 @@ private static int Write(Stream stream, T value, Func fu if (!stream.CanWrite) throw new Exception("Stream is not writable"); -#if NETSTANDARD1_1 - var size = Marshal.SizeOf(typeof(T)); -#else var size = Marshal.SizeOf(); -#endif var buffer = ArrayPool.Shared.Rent(size); int length = -1; try @@ -134,6 +125,7 @@ private static int Write(Stream stream, T value, Func fu } private static async Task WriteAsync(Stream stream, T value, Func func, CancellationToken cancellationToken = default(CancellationToken)) + where T : struct { if (stream == null) throw new ArgumentNullException(nameof(stream)); @@ -141,11 +133,7 @@ private static int Write(Stream stream, T value, Func fu if (!stream.CanWrite) throw new Exception("Stream is not writable"); -#if NETSTANDARD1_1 - var size = Marshal.SizeOf(typeof(T)); -#else var size = Marshal.SizeOf(); -#endif var buffer = ArrayPool.Shared.Rent(size); int length = -1; try diff --git a/src/BinaryEncoding/Binary.Varint.cs b/src/BinaryEncoding/Binary.Varint.cs index 49e81f6..e47dcd0 100644 --- a/src/BinaryEncoding/Binary.Varint.cs +++ b/src/BinaryEncoding/Binary.Varint.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -27,11 +27,11 @@ public static int GetByteCount(ulong value) return i + 1; } - public static byte[] GetBytes(short value) => GetBytes((ulong) value); - public static byte[] GetBytes(int value) => GetBytes((ulong) value); - public static byte[] GetBytes(long value) => GetBytes((ulong) value); - public static byte[] GetBytes(ushort value) => GetBytes((ulong) value); - public static byte[] GetBytes(uint value) => GetBytes((ulong) value); + public static byte[] GetBytes(short value) => GetBytes((ulong)value); + public static byte[] GetBytes(int value) => GetBytes((ulong)value); + public static byte[] GetBytes(long value) => GetBytes((ulong)value); + public static byte[] GetBytes(ushort value) => GetBytes((ulong)value); + public static byte[] GetBytes(uint value) => GetBytes((ulong)value); public static byte[] GetBytes(ulong value) { @@ -76,7 +76,7 @@ public static int Write(Span buffer, long value) return Write(buffer, ux); } - public static int Write(Stream stream, ushort value) => Write(stream, (ulong) value); + public static int Write(Stream stream, ushort value) => Write(stream, (ulong)value); public static int Write(Stream stream, uint value) => Write(stream, (ulong)value); public static int Write(Stream stream, ulong value) @@ -88,7 +88,7 @@ public static int Write(Stream stream, ulong value) value >>= 7; i++; } - stream.WriteByte((byte) value); + stream.WriteByte((byte)value); return i + 1; } diff --git a/src/BinaryEncoding/BinaryEncoding.csproj b/src/BinaryEncoding/BinaryEncoding.csproj index 471ddd1..44ee290 100644 --- a/src/BinaryEncoding/BinaryEncoding.csproj +++ b/src/BinaryEncoding/BinaryEncoding.csproj @@ -1,23 +1,21 @@ - + - netstandard1.1;netstandard2.0;net452 + netstandard2.0;netstandard2.1 Trond Arne Bråthen Trond Arne Bråthen BinaryEncoding - https://github.com/tabrath/BinaryEncoding/blob/master/LICENSE + https://github.com/tabrath/BinaryEncoding/blob/master/LICENSE git https://github.com/tabrath/BinaryEncoding Easily encode numbers to and from binary format - Copyright 2019 + Copyright 2021 Binary Encoding BigEndian LittleEndian Varint - 1.5.0 + 1.6.0 true AnyCPU Library - latest - $(PackageTargetFallback);netstandard;portable-net452+win8 true @@ -43,19 +41,14 @@ .pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder) + + + + - - + all - - - - - - - - diff --git a/test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj b/test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj index 308c38e..0091250 100644 --- a/test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj +++ b/test/BinaryEncoding.Tests/BinaryEncoding.Tests.csproj @@ -1,7 +1,7 @@ - + - netcoreapp1.1;netcoreapp2.2;net452 + netcoreapp3.1;net48;net5;net6 x64 false true @@ -29,19 +29,21 @@ - + - - - - - - - - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/test/BinaryEncoding.Tests/BinaryTests.BigEndian.cs b/test/BinaryEncoding.Tests/BinaryTests.BigEndian.cs index eefe6c5..fad2a57 100644 --- a/test/BinaryEncoding.Tests/BinaryTests.BigEndian.cs +++ b/test/BinaryEncoding.Tests/BinaryTests.BigEndian.cs @@ -1,4 +1,4 @@ -using System; +using System; using Xunit; namespace BinaryEncoding.Tests diff --git a/test/BinaryEncoding.Tests/BinaryTests.LittleEndian.cs b/test/BinaryEncoding.Tests/BinaryTests.LittleEndian.cs index e674c54..ac0b5c5 100644 --- a/test/BinaryEncoding.Tests/BinaryTests.LittleEndian.cs +++ b/test/BinaryEncoding.Tests/BinaryTests.LittleEndian.cs @@ -1,4 +1,4 @@ -using System; +using System; using Xunit; namespace BinaryEncoding.Tests diff --git a/test/BinaryEncoding.Tests/BinaryTests.Stream.cs b/test/BinaryEncoding.Tests/BinaryTests.Stream.cs index edce84f..3096b52 100644 --- a/test/BinaryEncoding.Tests/BinaryTests.Stream.cs +++ b/test/BinaryEncoding.Tests/BinaryTests.Stream.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading.Tasks; using Xunit; diff --git a/test/BinaryEncoding.Tests/BinaryTests.cs b/test/BinaryEncoding.Tests/BinaryTests.cs index cb93e42..d659768 100644 --- a/test/BinaryEncoding.Tests/BinaryTests.cs +++ b/test/BinaryEncoding.Tests/BinaryTests.cs @@ -1,4 +1,4 @@ -namespace BinaryEncoding.Tests +namespace BinaryEncoding.Tests { public partial class BinaryTests { diff --git a/tmp/Directory.Build.props b/tmp/Directory.Build.props deleted file mode 100644 index 890649a..0000000 --- a/tmp/Directory.Build.props +++ /dev/null @@ -1,28 +0,0 @@ - - - - - true - - - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono - /usr/lib/mono - /usr/local/lib/mono - - - $(BaseFrameworkPathOverrideForMono)/4.5-api - $(BaseFrameworkPathOverrideForMono)/4.5.1-api - $(BaseFrameworkPathOverrideForMono)/4.5.2-api - $(BaseFrameworkPathOverrideForMono)/4.6-api - $(BaseFrameworkPathOverrideForMono)/4.6.1-api - $(BaseFrameworkPathOverrideForMono)/4.6.2-api - $(BaseFrameworkPathOverrideForMono)/4.7-api - $(BaseFrameworkPathOverrideForMono)/4.7.1-api - $(BaseFrameworkPathOverrideForMono)/4.7.2-api - true - - - {RawFileName};{CandidateAssemblyFiles};{HintPathFromItem};$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths) - $(BaseFrameworkPathOverrideForMono)/4.5;$(BaseFrameworkPathOverrideForMono)/4.5/Facades;$(AssemblySearchPaths) - - diff --git a/version.json b/version.json new file mode 100644 index 0000000..36e0199 --- /dev/null +++ b/version.json @@ -0,0 +1,20 @@ +{ + "version": "1.6", + "pathFilters": [ + "src" + ], + "publicReleaseRefSpec": [ + "^refs/heads/master$", + "^refs/tags/v\\d+\\.\\d+" + ], + "cloudBuild": { + "setVersionVariables": true, + "buildNumber": { + "enabled": false, + "includeCommitId": { + "when": "nonPublicReleaseOnly", + "where": "buildMetadata" + } + } + } +}