Skip to content
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
8 changes: 4 additions & 4 deletions Adyen.Test/Adyen.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<IsPackable>false</IsPackable>
<AssemblyVersion>32.2.1</AssemblyVersion>
<FileVersion>32.2.1</FileVersion>
<Version>32.2.1</Version>
<PackageVersion>32.2.1</PackageVersion>
<AssemblyVersion>32.2.2</AssemblyVersion>
<FileVersion>32.2.2</FileVersion>
<Version>32.2.2</Version>
<PackageVersion>32.2.2</PackageVersion>
Comment on lines +9 to +12

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To simplify version management and reduce redundancy, you can rely on the Version property. AssemblyVersion, FileVersion, and PackageVersion all default to the value of Version if not specified. You can remove the explicit declarations for AssemblyVersion, FileVersion, and PackageVersion.

    <Version>32.2.2</Version>

</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions Adyen/Adyen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<Nullable>disable</Nullable>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Adyen</Copyright>
<Version>32.2.1</Version>
<AssemblyVersion>32.2.1</AssemblyVersion>
<FileVersion>32.2.1</FileVersion>
<Version>32.2.2</Version>
<AssemblyVersion>32.2.2</AssemblyVersion>
<FileVersion>32.2.2</FileVersion>
Comment on lines +11 to +12

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The AssemblyVersion and FileVersion properties default to the value of the Version property if they are not specified. Since they are all being set to the same value, you can remove these two lines to reduce redundancy and simplify version management.

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource>
<Description>The Adyen API Library for .NET Core allows developers to interact with the Adyen APIs, including Hosted Payment Pages and the Terminal API.</Description>
<PackageProjectUrl>https://github.com/Adyen/adyen-dotnet-api-library</PackageProjectUrl>
<RepositoryUrl>https://github.com/Adyen/adyen-dotnet-api-library</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>32.2.1</PackageTags>
<PackageTags>32.2.2</PackageTags>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using the version number as a package tag is unconventional. PackageTags are meant for keywords that help users discover your package on NuGet, while the version is already a primary property of the package. Consider using descriptive tags like adyen, payment, fintech, pos, terminal instead. If the version number is required here for some internal process, consider automating its update from a single source of truth to avoid manual errors.

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Adyen</Authors>
<Company>Adyen</Company>
Expand All @@ -29,7 +29,7 @@
<AssemblyOriginatorKeyFile>adyen-dotnet-api-library-key.snk</AssemblyOriginatorKeyFile>
<PackageIcon>adyen-logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageVersion>32.2.1</PackageVersion>
<PackageVersion>32.2.2</PackageVersion>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PackageVersion property also defaults to the value of the Version property. You can remove this line to avoid duplication and simplify version management.

<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Constants/ClientConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public class ClientConfig
public const string NexoProtocolVersion = "3.0";

public const string LibName = "adyen-dotnet-api-library";
public const string LibVersion = "32.2.1";
public const string LibVersion = "32.2.2";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This hardcoded version string is another place where the version number is duplicated across the codebase. This increases the risk of inconsistencies during a release. To ensure this value is always in sync with the project version, consider reading it from the assembly's metadata at runtime.

For example, you could change this const to a static property:

using System.Reflection;
// ...
public static string LibVersion { get; } = typeof(ClientConfig).Assembly.GetCustomAttribute<System.Reflection.AssemblyInformationalVersionAttribute>()?.InformationalVersion;

This would centralize your versioning and make releases less error-prone.

}
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
32.2.1
32.2.2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Having a separate VERSION file that is manually updated adds another step to the release process and can lead to version mismatches. To improve maintainability, consider generating this file as part of your build or release pipeline, sourcing the version from a single, centralized definition (like the one in the main .csproj file).

Loading