Skip to content

Commit

Permalink
Bump xunit from 2.5.0 to 2.5.1 (#67)
Browse files Browse the repository at this point in the history
* Bump xunit from 2.5.0 to 2.5.1

Bumps [xunit](https://github.com/xunit/xunit) from 2.5.0 to 2.5.1.
- [Commits](xunit/xunit@2.5.0...2.5.1)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump xunit.runner.visualstudio from 2.5.0 to 2.5.1

Bumps [xunit.runner.visualstudio](https://github.com/xunit/xunit) from 2.5.0 to 2.5.1.
- [Commits](xunit/xunit@2.5.0...2.5.1)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Refactor MsBuild Tasks

* Use wildcard for openApi spec

* Fix ExtractAppStoreConnectOpenApiSpecification

* Fix SerializeOneOfWorks

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jan Trejbal <[email protected]>
  • Loading branch information
dependabot[bot] and trejjam authored Sep 18, 2023
1 parent f031505 commit 6bee9a3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<AppStoreConnectOpenApiSpecificationUrl>https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip</AppStoreConnectOpenApiSpecificationUrl>
<AppStoreConnectOpenApiSpecificationFile>app-store-connect-openapi-specification.zip</AppStoreConnectOpenApiSpecificationFile>
<AppStoreConnectOpenApiSpecificationExtracted>app-store-connect-openapi-specification</AppStoreConnectOpenApiSpecificationExtracted>
<AppStoreConnectOpenApiSpecificationJson>openapi.json</AppStoreConnectOpenApiSpecificationJson>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -25,21 +26,31 @@
<Import Project="..\Apple.AppStoreConnect.OpenApiDocument.Generator\Apple.AppStoreConnect.OpenApiDocument.Generator.props" />

<ItemGroup>
<AdditionalFiles Include="$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)/openapi.json" OpenApi="Apple.AppStoreConnect" />
<AdditionalFiles Include="$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)/$(AppStoreConnectOpenApiSpecificationJson)" OpenApi="Apple.AppStoreConnect" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Apple.AppStoreConnect.OpenApiDocument.Generator\Apple.AppStoreConnect.OpenApiDocument.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" />
</ItemGroup>

<Target Name="DownloadAppStoreConnectOpenApiSpecification" BeforeTargets="Restore;_GenerateRestoreProjectSpec" Condition="!Exists('$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)')">
<Target Name="DownloadAppStoreConnectOpenApiSpecification" BeforeTargets="Restore;_GenerateRestoreProjectSpec" Condition="!Exists('$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationFile)')">
<Message Importance="High" Text="Downloading $(AppStoreConnectOpenApiSpecificationUrl) to the $(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationFile)" />

<Exec WorkingDirectory="$(ProjectDir)" Command="curl -sS $(AppStoreConnectOpenApiSpecificationUrl) --output $(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationFile)" />
</Target>

<Target Name="ExtractAppStoreConnectOpenApiSpecification" BeforeTargets="Restore;_GenerateRestoreProjectSpec" AfterTargets="DownloadAppStoreConnectOpenApiSpecification" Condition="!Exists('$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)')">
<Message Importance="High" Text="Extracting $(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationFile) to the $(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)" />

<Unzip SourceFiles="$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationFile)" DestinationFolder="$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)" OverwriteReadOnlyFiles="true" />

<ItemGroup>
<OriginalOpenApiJsonFile Include="$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)/*.json" />
</ItemGroup>

<Message Importance="High" Text="Renamed File: @(OriginalOpenApiJsonFile) to $(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)/$(AppStoreConnectOpenApiSpecificationJson)" />

<Move SourceFiles="@(OriginalOpenApiJsonFile)" DestinationFiles="$(MSBuildProjectDirectory)/$(AppStoreConnectOpenApiSpecificationExtracted)/$(AppStoreConnectOpenApiSpecificationJson)" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ public void SerializeOneOfWorks(TestingAppAvailabilityResponseIncluded oneOf)
Assert.Equal("""
{
"type": "territories",
"id": "territory-id",
"links": {
"self": "self-url"
}
"id": "territory-id"
}
""".Replace("\r\n", Environment.NewLine), json);
break;
Expand Down Expand Up @@ -158,21 +155,17 @@ public static IEnumerable<object[]> OneOfObjectData()
{
Type = TerritoryType.Territories,
Id = "territory-id",
Links = new ResourceLinks
{
Self = "self-url",
},
}
},
};
}

public enum AppAvailabilityResponseIncludedEnum
{
[EnumMember(Value = @"App")]
[EnumMember(Value = "App")]
App = 0,

[EnumMember(Value = @"Territory")]
[EnumMember(Value = "Territory")]
Territory = 1,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 6bee9a3

Please sign in to comment.