Skip to content

Commit

Permalink
Merge branch 'release/1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
max-eroshkin committed Sep 22, 2023
2 parents e76c4b4 + 5bc2f4b commit 07011c2
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
5 changes: 4 additions & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
<ItemGroup>
<PackageReference Include="BimLab.Nuke" Version="2023.1.0-dev02" />
<PackageReference Include="Tools.InnoSetup" Version="6.2.2" IncludeAssets="All" />
<PackageReference Include="NuGet.CommandLine" Version="6.4.0"/>
<PackageReference Include="NuGet.CommandLine" Version="6.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
38 changes: 38 additions & 0 deletions source/BuilderTests/EnumTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
namespace BuilderTests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using FluentAssertions;
using InnoSetup.ScriptBuilder;
using Xunit;

public class EnumTests
{
[Theory]
[MemberData(nameof(GetFlagEnums))]
public void ValueDuplicationTest(Type enumType)
{
if (!enumType.IsEnum)
throw new ArgumentException($"{enumType.Name} is not an enum");

var values = Enum
.GetValues(enumType)
.Cast<object>()
.Select(x => new { Value = Enum.Format(enumType, x, "D"), EnumValue = x })
.GroupBy(x => x.Value)
.Where(x => x.Count() > 1)
.ToList();

values.Should().BeEmpty();
}

public static IEnumerable<object[]> GetFlagEnums()
{
return typeof(Architectures).Assembly.GetTypes()
.Where(x => x.IsEnum && x.GetCustomAttribute<FlagsAttribute>() != null)
.Select(x => new object[] { x });
}
}
}
6 changes: 4 additions & 2 deletions source/Directory.Build.Props
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
</ItemGroup>

<PropertyGroup>
<Version>1.3.0</Version>
<Company>Reactive BIM</Company>
<Version>1.3.1</Version>
<Authors>Reactive BIM</Authors>
<Product>InnoSetup Script Builder</Product>
<PackageTags>installer innosetup inno script builder</PackageTags>
Expand All @@ -31,6 +30,9 @@
<RepositoryUrl>https://github.com:max-eroshkin/InnoSetup.ScriptBuilder.git</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<NoPackageAnalysis>true</NoPackageAnalysis>
<PackageReleaseNotes>
Fixed "RegTypeLib value has the same value of OverwriteReadonly"
</PackageReleaseNotes>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion source/InnoSetup.ScriptBuilder/Constants/FileFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public enum FileFlags : ulong
PromptIfolder = 0x100000,
RecurseSubdirs = 0x200000,
RegServer = 0x400000,
RegTypeLib = 0x80000,
RegTypeLib = 0x800000,
ReplaceSameVersion = 0x1000000,
RestartReplace = 0x2000000,
SetNtfsCompression = 0x4000000,
Expand Down

0 comments on commit 07011c2

Please sign in to comment.