Skip to content

Commit

Permalink
Handle missing attribute DeletePath/@order
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Jun 5, 2024
1 parent 629b04d commit 1ee4015
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/github-actions-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
psw_wix_version:
description: 'PanelSwWix4 version'
required: true
default: 5.0.0-psw-wix.0275-51
default: 5.0.0-psw-wix.0285-52
type: string

jobs:
Expand All @@ -37,7 +37,7 @@ jobs:
Add-Content -Path ${{ github.env }} -Value "PSW_WIX_VERSION=${{ env.DEFAULT_PSW_WIX_VERSION }}"
}
env:
DEFAULT_PSW_WIX_VERSION: '5.0.0-psw-wix.0275-51'
DEFAULT_PSW_WIX_VERSION: '5.0.0-psw-wix.0285-52'

- name: Prepare for build
run: |
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<Wix4Version Condition=" '$(Wix4Version)' == '' ">4.0.5</Wix4Version>
<PanelSwWix4Version Condition=" '$(PanelSwWix4Version)' == '' ">5.0.0-psw-wix.0275-51</PanelSwWix4Version>
<PanelSwWix4Version Condition=" '$(PanelSwWix4Version)' == '' ">5.0.0-psw-wix.0285-52</PanelSwWix4Version>
<SevenZapVersion Condition=" '$(SevenZapVersion)' == '' ">23.1.33</SevenZapVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
7 changes: 7 additions & 0 deletions src/PanelSwWixExtension/PanelSwWixCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4327,6 +4327,13 @@ private void ParseDeletePath(IntermediateSection section, XElement element)
case "Condition":
condition = ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "Order":
order = ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, -1000000000, 1000000000);
if (order < 0)
{
order += int.MaxValue;
}
break;

default:
ParseHelper.UnexpectedAttribute(element, attrib);
Expand Down
5 changes: 5 additions & 0 deletions src/PanelSwWixExtension/Xsd/PanelSwWixExtension.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,11 @@ Note that build-time resolution may be harmed by this process. For example, MsiA
<xs:documentation>Condition on executing the deletion.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Order" use="optional" type="xs:int" default="0">
<xs:annotation>
<xs:documentation><![CDATA[Order of execution, defaults to line number. Elements with explicit order field will be executed before elements with implicit order. Negative Order values will be executed last in increasing order. For example, Order="-1" will be executed last, after Order="-2"]]></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Expand Down
2 changes: 1 addition & 1 deletion src/TidyBuild.custom.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)TidyBuild.user.props" Condition="Exists('$(MSBuildThisFileDirectory)TidyBuild.user.props')"/>
<PropertyGroup>
<FullVersion>3.19.0</FullVersion>
<FullVersion>3.19.1</FullVersion>
<FullVersion Condition=" '$(GITHUB_RUN_NUMBER)'!='' ">$(FullVersion).$(GITHUB_RUN_NUMBER)</FullVersion>
<ProductName>PanelSwWixExtension</ProductName>
<Manufacturer>Panel::Software</Manufacturer>
Expand Down
2 changes: 1 addition & 1 deletion src/global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"msbuild-sdks": {
"WixToolset.Sdk": "4.0.5",
"PanelSwWix4.Sdk": "5.0.0-psw-wix.0275-51",
"PanelSwWix4.Sdk": "5.0.0-psw-wix.0285-52",
"Microsoft.Build.Traversal": "4.0.0"
}
}

0 comments on commit 1ee4015

Please sign in to comment.