Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared Assembly Info #2512

Merged
merged 2 commits into from
Jul 18, 2024
Merged
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
22 changes: 6 additions & 16 deletions scripts/apply_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,12 @@ def fileReplaceLinesWith(filename: str, list: dict[str, str], encoding="utf-8"):
" public const double VersionNumber = ": f" {versionCode}; // Do not modify this line, use file scripts/apply_versions.py\n",
}, encoding="utf-8-sig")

# Get a list of files in the current directory
files = list(glob.iglob(glob.escape(".") + '/**/*', recursive=True))

# Filter the list to only include .csproj files
csproj_files = [file for file in files if file.endswith(".csproj")]

# Iterate over each .csproj file
for csproj_file in csproj_files:
# Perform your desired operations on each .csproj file
# For example, you can call the `fileReplaceLinesWith` function here
fileReplaceLinesWith(csproj_file, {
"<FileVersion>": f"{versionISS}</FileVersion>\n",
"<InformationalVersion>": f"{versionName}</InformationalVersion>\n",
"<ApplicationVersion>": f"{versionName}</ApplicationVersion>\n",
# Your replacement dictionary here
}, encoding="utf-8-sig")
fileReplaceLinesWith("src/SharedAssemblyInfo.cs", {
"[assembly: AssemblyVersion(\"": f"{versionISS}\")]\n",
"[assembly: AssemblyFileVersion(\"": f"{versionISS}\")]\n",
"[assembly: AssemblyInformationalVersion(\"": f"{versionName}\")]\n",
# Your replacement dictionary here
}, encoding="utf-8-sig")

fileReplaceLinesWith("WingetUI.iss", {
"#define MyAppVersion": f" \"{versionName}\"\n",
Expand Down
7 changes: 7 additions & 0 deletions src/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using System.Reflection;

[assembly: AssemblyProduct("UniGetUI")]
[assembly: AssemblyCopyright("2024, Martí Climent")]
[assembly: AssemblyVersion("3.1.1.0")]
[assembly: AssemblyFileVersion("3.1.1.0")]
[assembly: AssemblyInformationalVersion("3.1.1-beta1")]
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down Expand Up @@ -53,4 +49,7 @@
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
15 changes: 7 additions & 8 deletions src/UniGetUI.Core.Classes/UniGetUI.Core.Classes.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">


<PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
Expand All @@ -12,17 +11,17 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
11 changes: 5 additions & 6 deletions src/UniGetUI.Core.Data.Tests/UniGetUI.Core.Data.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down Expand Up @@ -53,4 +49,7 @@
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
11 changes: 5 additions & 6 deletions src/UniGetUI.Core.Data/UniGetUI.Core.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -35,4 +31,7 @@
</None>
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">


<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -12,16 +12,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down Expand Up @@ -52,4 +48,8 @@
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
11 changes: 5 additions & 6 deletions src/UniGetUI.Core.IconStore/UniGetUI.Core.IconEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -33,4 +29,7 @@
<ProjectReference Include="..\UniGetUI.Core.Tools\UniGetUI.Core.Tools.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down Expand Up @@ -53,4 +49,7 @@
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down Expand Up @@ -107,4 +103,7 @@
</None>
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
11 changes: 5 additions & 6 deletions src/UniGetUI.Core.Logger/UniGetUI.Core.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down Expand Up @@ -53,4 +49,7 @@
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand All @@ -46,4 +42,7 @@
<Using Include="Xunit" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
11 changes: 5 additions & 6 deletions src/UniGetUI.Core.Settings/UniGetUI.Core.Settings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@
<SdkVersion>8.0.204</SdkVersion>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PublishSelfContained>true</PublishSelfContained>
<FileVersion>3.1.1.0</FileVersion>
<InformationalVersion>3.1.1-beta1</InformationalVersion>
<Product>UniGetUI</Product>
<Authors>Martí Climent and the contributors</Authors>
<PublisherName>Martí Climent</PublisherName>
<ApplicationVersion>3.1.1-beta1</ApplicationVersion>
<Copyright>2024, Martí Climent</Copyright>
<Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -30,4 +26,7 @@
<ProjectReference Include="..\UniGetUI.Core.Logger\UniGetUI.Core.Logging.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs" Link="SharedAssemblyInfo.cs" />
</ItemGroup>
</Project>
Loading
Loading