Skip to content
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
5 changes: 4 additions & 1 deletion RaspberryDebugger/Models/Raspberry/RaspberryModelCheck.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Linq;
using Org.BouncyCastle.Ocsp;
using System.Collections.Generic;
using System.Linq;

namespace RaspberryDebugger.Models.Raspberry
{
Expand All @@ -15,7 +16,9 @@ public RaspberryModelCheck()
{
"Raspberry Pi 3 Model",
"Raspberry Pi 4 Model",
"Raspberry Pi 5 Model",
"Raspberry Pi Compute Module 4",
"Raspberry Pi Compute Module 5",
"Raspberry Pi Zero 2"
};
}
Expand Down
53 changes: 22 additions & 31 deletions RaspberryDebugger/RaspberryDebugger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.25" Condition="!Exists('packages.config')">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" Condition="!Exists('packages.config')">
<PrivateAssets>all</PrivateAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!--<PackageReference Include="Neon.Common">
<Version>4.0.12</Version>
Expand Down Expand Up @@ -216,42 +216,33 @@
</ProjectReference>
</ItemGroup>
<UsingTask TaskName="UpdateVsixManifestVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<FilePath ParameterType="System.String" Required="true" />
<Version ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="cs">
<![CDATA[
<ParameterGroup>
<FilePath ParameterType="System.String" Required="true" />
<Version ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="cs"><![CDATA[
string content = File.ReadAllText(FilePath);
string updatedContent = Regex.Replace(content,
"<Identity Id=\"Raspberry Debugger\\.4f9de82d-0bbe-493c-8c12-9dbd38e93008\" Version=\".*?\" Language=\"en-US\" Publisher=\"GingerMintSoft\" />",
string.Format("<Identity Id=\"Raspberry Debugger.4f9de82d-0bbe-493c-8c12-9dbd38e93008\" Version=\"{0}\" Language=\"en-US\" Publisher=\"GingerMintSoft\" />", Version));
File.WriteAllText(FilePath, updatedContent);
]]>
</Code>
</Task>
]]></Code>
</Task>
</UsingTask>

<Target Name="SetVersion" AfterTargets="GetBuildVersion">
<PropertyGroup>
<VsixVersion>$(BuildVersion)</VsixVersion>
</PropertyGroup>

<ItemGroup>
<VsixManifestFile Include="source.extension.vsixmanifest" />
</ItemGroup>

<Message Text="Updating VSIX manifest version to $(VsixVersion)" Importance="High" />

<UpdateVsixManifestVersion
FilePath="source.extension.vsixmanifest"
Version="$(VsixVersion)" />
<PropertyGroup>
<VsixVersion>$(BuildVersion)</VsixVersion>
</PropertyGroup>
<ItemGroup>
<VsixManifestFile Include="source.extension.vsixmanifest" />
</ItemGroup>
<Message Text="Updating VSIX manifest version to $(VsixVersion)" Importance="High" />
<UpdateVsixManifestVersion FilePath="source.extension.vsixmanifest" Version="$(VsixVersion)" />
</Target>

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down