Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Remove module text file, change build script (#8)
Browse files Browse the repository at this point in the history
* Remove module text file, change build script

* Add lua and Arduino window titles
  • Loading branch information
jdahlblom authored Mar 2, 2024
1 parent e044d75 commit 76f37bc
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 88 deletions.
4 changes: 0 additions & 4 deletions src/BIOSBuddy/BIOSBuddy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
</PropertyGroup>
<ItemGroup>
<None Remove="dcs-bios_modules.txt" />
<None Remove="Images\112_RefreshArrow_Green_32x32_72.png" />
<None Remove="Images\arduino_logo_simple.png" />
<None Remove="Images\clear_search_result.png" />
Expand All @@ -39,9 +38,6 @@
<PackageReference Include="NLog" Version="5.2.8" />
</ItemGroup>
<ItemGroup>
<Content Include="dcs-bios_modules.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<ProjectReference Include="..\DCSFPCommon\src\ClassLibraryCommon\ClassLibraryCommon.csproj" />
<ProjectReference Include="..\DCSFPCommon\src\DCS-BIOS\DCS-BIOS.csproj" />
<Resource Include="Images\112_RefreshArrow_Green_32x32_72.png" />
Expand Down
2 changes: 1 addition & 1 deletion src/BIOSBuddy/Windows/ArduinoWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:customControls="clr-namespace:BIOSBuddy.CustomControls"
mc:Ignorable="d"
Title="" Height="400" Width="Auto"
Title="Arduino code" Height="400" Width="Auto"
Loaded="ArduinoWindow_OnLoaded"
WindowStartupLocation="CenterScreen"
KeyDown="ArduinoWindow_OnKeyDown" KeyUp="ArduinoWindow_OnKeyUp" Icon="/Images/FlightPanels01.png">
Expand Down
2 changes: 1 addition & 1 deletion src/BIOSBuddy/Windows/LuaWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:customControls="clr-namespace:BIOSBuddy.CustomControls"
mc:Ignorable="d"
Title="" Height="400" Width="Auto"
Title="Lua code" Height="400" Width="Auto"
Loaded="LuaWindow_OnLoaded"
WindowStartupLocation="CenterScreen"
KeyDown="LuaWindow_OnKeyDown" KeyUp="LuaWindow_OnKeyUp" Icon="/Images/FlightPanels01.png">
Expand Down
51 changes: 0 additions & 51 deletions src/BIOSBuddy/dcs-bios_modules.txt

This file was deleted.

64 changes: 33 additions & 31 deletions src/PublishReleaseBuddy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
$publishPath = $scriptPath + "\_PublishTemp_\"

$changeVersion = Read-Host "Change version? Y/N"

#---------------------------------
# Pre-checks
#---------------------------------
Expand All @@ -22,39 +24,39 @@ If (-not(Test-Path $projectFilePath)) {
exit
}

#Reading BIOSBuddy project file
$xml = [xml](Get-Content $projectFilePath)
[string]$assemblyVersion = $xml.Project.PropertyGroup.AssemblyVersion

#Split the Version Numbers
$avMajor, $avMinor, $avPatch = $assemblyVersion.Split('.')

Write-Host "Current assembly version is: $assemblyVersion" -foregroundcolor "Green"
Write-Host "Current Minor version is: $avMinor" -foregroundcolor "Green"

#Sets new version into Project
#Warning: for this to work, since the PropertyGroup is indexed, AssemblyVersion must be in the FIRST Propertygroup (or else, change the index).
Write-Host "What kind of release is this? If not minor then patch version will be incremented." -foregroundcolor "Green"
$isMinorRelease = Read-Host "Minor release? Y/N"

if($isMinorRelease.Trim().ToLower().Equals("y"))
{
[int]$avMinor = [int]$avMinor + 1
[int]$avPatch = 0
}
else
{
[int]$avPatch = [int]$avPatch + 1
if ($changeVersion.Trim().ToLower().Equals("y")) {
#Reading BIOSBuddy project file
$xml = [xml](Get-Content $projectFilePath)
[string]$assemblyVersion = $xml.Project.PropertyGroup.AssemblyVersion

#Split the Version Numbers
$avMajor, $avMinor, $avPatch = $assemblyVersion.Split('.')

Write-Host "Current assembly version is: $assemblyVersion" -foregroundcolor "Green"
Write-Host "Current Minor version is: $avMinor" -foregroundcolor "Green"

#Sets new version into Project
#Warning: for this to work, since the PropertyGroup is indexed, AssemblyVersion must be in the FIRST Propertygroup (or else, change the index).
Write-Host "What kind of release is this? If not minor then patch version will be incremented." -foregroundcolor "Green"
$isMinorRelease = Read-Host "Minor release? Y/N"

if ($isMinorRelease.Trim().ToLower().Equals("y")) {
[int]$avMinor = [int]$avMinor + 1
[int]$avPatch = 0
}
else {
[int]$avPatch = [int]$avPatch + 1
}

$xml.Project.PropertyGroup.AssemblyVersion = "$avMajor.$avMinor.$avPatch".Trim()
[string]$assemblyVersion = $xml.Project.PropertyGroup.AssemblyVersion
Write-Host "New assembly version is $assemblyVersion" -foregroundcolor "Green"
#Saving project file
$xml.Save($projectFilePath)
Write-Host "Project file updated" -foregroundcolor "Green"
Write-Host "Finished release version management" -foregroundcolor "Green"
}

$xml.Project.PropertyGroup.AssemblyVersion = "$avMajor.$avMinor.$avPatch".Trim()
[string]$assemblyVersion = $xml.Project.PropertyGroup.AssemblyVersion
Write-Host "New assembly version is $assemblyVersion" -foregroundcolor "Green"
#Saving project file
$xml.Save($projectFilePath)
Write-Host "Project file updated" -foregroundcolor "Green"
Write-Host "Finished release version management" -foregroundcolor "Green"

#---------------------------------
# Tests execution For BIOSBuddy
#---------------------------------
Expand Down

0 comments on commit 76f37bc

Please sign in to comment.