From 1d49ea67ade030bd8ac957eeff1f32a785ad682b Mon Sep 17 00:00:00 2001 From: jtalborough Date: Thu, 27 Feb 2025 17:51:07 -0500 Subject: [PATCH 1/7] feat: enhance build process with detailed logging and new target for CPZ creation --- src/Directory.Build.targets | 71 ++++++++++++++++--- .../PepperDash.Essentials.csproj | 2 +- 2 files changed, 64 insertions(+), 9 deletions(-) diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 83bbc930..50fba408 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -10,17 +10,72 @@ - + + + + + + - - - + + + + + + - - - + + + + + + + + + + + + + $(HOME)/.crestron/SimplSharpPro/SimplSharpCompiler + + + + + + + + + + + + + + + + + + - + + + + + \ No newline at end of file diff --git a/src/PepperDash.Essentials/PepperDash.Essentials.csproj b/src/PepperDash.Essentials/PepperDash.Essentials.csproj index 68cdf106..7334e263 100644 --- a/src/PepperDash.Essentials/PepperDash.Essentials.csproj +++ b/src/PepperDash.Essentials/PepperDash.Essentials.csproj @@ -6,7 +6,7 @@ PepperDash.Essentials PepperDashEssentials - net472;net6 + net472 true bin\$(Configuration)\ PepperDash Essentials From bacc0a4f57d03447eec9048913a839df41c5b7e7 Mon Sep 17 00:00:00 2001 From: jtalborough Date: Thu, 27 Feb 2025 18:12:16 -0500 Subject: [PATCH 2/7] fix: update artifact path syntax in docker workflow for release action --- .github/workflows/docker.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 84996eaf..a7acbcbd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -76,12 +76,9 @@ jobs: # Create the release on the source repo - name: Create Release id: create_release -# if: contains(steps.setVersion.outputs.version,'-rc-') || -# contains(steps.setVersion.outputs.version,'-hotfix-') || -# contains(steps.setVersion.outputs.version, '-beta-') uses: ncipollo/release-action@v1 with: - artifacts: 'output\**\*.*(cpz|cplz)' + artifacts: 'output/**/*.{cpz,cplz}' generateReleaseNotes: true prerelease: ${{contains('debug', env.BUILD_TYPE)}} tag: ${{ steps.setVersion.outputs.version }} From 0944be2a70fbbf36001e119ee19394c8d240371d Mon Sep 17 00:00:00 2001 From: jtalborough Date: Thu, 27 Feb 2025 18:30:26 -0500 Subject: [PATCH 3/7] feat: add CPZ file handling and logging in Docker workflow and build targets --- .github/workflows/docker.yml | 35 +++++++++++++++++++++++++++++++++-- src/Directory.Build.targets | 29 ++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a7acbcbd..ed5fcec2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -66,8 +66,39 @@ jobs: # Build the solutions in the docker image - name: Build Solution run: msbuild .\$($Env:SOLUTION_FILE).sln /p:Platform="Any CPU" /p:Configuration="Debug" /p:Version="${{ steps.setVersion.outputs.version }}" -m + - name: Debug CPZ Files + shell: powershell + run: | + Write-Host "Checking for CPZ files..." + $targetDir = ".\$($Env:SOLUTION_FILE)\bin\$($Env:BUILD_TYPE)\net472\" + $outputDir = ".\output\" + + Write-Host "Files in target directory:" + Get-ChildItem -Path $targetDir -Recurse | Where-Object { $_.Extension -eq ".cpz" } | ForEach-Object { Write-Host $_.FullName } + + Write-Host "Files in output directory:" + Get-ChildItem -Path $outputDir -Recurse | Where-Object { $_.Extension -eq ".cpz" } | ForEach-Object { Write-Host $_.FullName } + + # Copy CPZ files to output if they exist but weren't copied + Get-ChildItem -Path $targetDir -Recurse | Where-Object { $_.Extension -eq ".cpz" } | ForEach-Object { + $destPath = Join-Path $outputDir "$($Env:SOLUTION_FILE)\$($_.Name)" + Write-Host "Copying $($_.FullName) to $destPath" + Copy-Item -Path $_.FullName -Destination $destPath -Force + } - name: Pack Solution - run: dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}" + run: | + dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}" /p:IncludeSymbols=true /p:IncludeSource=true + + # Ensure CPZ files are included in the package + $cpzFiles = Get-ChildItem -Path . -Recurse | Where-Object { $_.Extension -eq ".cpz" } + if ($cpzFiles.Count -eq 0) { + Write-Host "WARNING: No CPZ files found!" + } else { + Write-Host "Found $($cpzFiles.Count) CPZ files" + foreach ($file in $cpzFiles) { + Write-Host "CPZ file: $($file.FullName)" + } + } - name: Create tag for non-rc builds if: contains(steps.setVersion.outputs.version, 'alpha') run: | @@ -78,7 +109,7 @@ jobs: id: create_release uses: ncipollo/release-action@v1 with: - artifacts: 'output/**/*.{cpz,cplz}' + artifacts: 'output\**\*.*(cpz|cplz)' generateReleaseNotes: true prerelease: ${{contains('debug', env.BUILD_TYPE)}} tag: ${{ steps.setVersion.outputs.version }} diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 50fba408..14a864cc 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,5 +1,10 @@ + + + true + build; + true build; @@ -27,7 +32,29 @@ - + + + + + + + + + + + + + + + Date: Thu, 27 Feb 2025 18:46:59 -0500 Subject: [PATCH 4/7] feat: improve CPZ file handling in Docker workflow and update build targets for better output management --- .github/workflows/docker.yml | 44 ++++++++++++++++++++++++------------ src/Directory.Build.targets | 15 ++++++++++-- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ed5fcec2..a5b42a54 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -70,20 +70,36 @@ jobs: shell: powershell run: | Write-Host "Checking for CPZ files..." - $targetDir = ".\$($Env:SOLUTION_FILE)\bin\$($Env:BUILD_TYPE)\net472\" - $outputDir = ".\output\" - - Write-Host "Files in target directory:" - Get-ChildItem -Path $targetDir -Recurse | Where-Object { $_.Extension -eq ".cpz" } | ForEach-Object { Write-Host $_.FullName } - - Write-Host "Files in output directory:" - Get-ChildItem -Path $outputDir -Recurse | Where-Object { $_.Extension -eq ".cpz" } | ForEach-Object { Write-Host $_.FullName } - - # Copy CPZ files to output if they exist but weren't copied - Get-ChildItem -Path $targetDir -Recurse | Where-Object { $_.Extension -eq ".cpz" } | ForEach-Object { - $destPath = Join-Path $outputDir "$($Env:SOLUTION_FILE)\$($_.Name)" - Write-Host "Copying $($_.FullName) to $destPath" - Copy-Item -Path $_.FullName -Destination $destPath -Force + + # First, let's find out the actual directory structure + Write-Host "Current directory: $(Get-Location)" + Write-Host "Directory structure:" + Get-ChildItem -Path . -Directory -Recurse -Depth 2 | ForEach-Object { Write-Host $_.FullName } + + # Look for all CPZ files in the repository + Write-Host "Searching for all CPZ files in the repository:" + $cpzFiles = Get-ChildItem -Path . -Recurse -Filter "*.cpz" + if ($cpzFiles.Count -eq 0) { + Write-Host "No CPZ files found in the repository." + } else { + Write-Host "Found $($cpzFiles.Count) CPZ files:" + foreach ($file in $cpzFiles) { + Write-Host " $($file.FullName)" + } + + # Create output directory if it doesn't exist + $outputDir = ".\output\build" + if (-not (Test-Path $outputDir)) { + New-Item -ItemType Directory -Path $outputDir -Force + Write-Host "Created output directory: $outputDir" + } + + # Copy all CPZ files to the output directory + foreach ($file in $cpzFiles) { + $destPath = Join-Path $outputDir $file.Name + Write-Host "Copying $($file.FullName) to $destPath" + Copy-Item -Path $file.FullName -Destination $destPath -Force + } } - name: Pack Solution run: | diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 14a864cc..d95e1dc2 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,11 +1,20 @@ + - + true build; - + + true + build; + + + true + build; + + true build; @@ -14,6 +23,8 @@ build; + + From 4360e7f9926f1d3e3a835205a058371b6ac95942 Mon Sep 17 00:00:00 2001 From: jtalborough Date: Thu, 27 Feb 2025 18:51:39 -0500 Subject: [PATCH 5/7] refactor: clean up Directory.Build.targets by removing unnecessary closing tag --- src/Directory.Build.targets | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index d95e1dc2..a75851ad 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,4 +1,3 @@ - @@ -23,8 +22,6 @@ build; - - From 4ed5bb7adaa0e2b7f1d1dd344f9ad6e3c509af94 Mon Sep 17 00:00:00 2001 From: jtalborough Date: Thu, 27 Feb 2025 18:59:29 -0500 Subject: [PATCH 6/7] build: trigger --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0fe4f075..79486ebf 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Provided under MIT license + ## Overview PepperDash Essentials is an open source Crestron framework that can be configured as a standalone program capable of running a wide variety of system designs and can also be utilized as a plug-in architecture to augment other Simpl# Pro and Simpl Windows programs. From afc37f5426ac8df8b8d1b150cf0a09ddab62af2c Mon Sep 17 00:00:00 2001 From: jtalborough Date: Thu, 27 Feb 2025 19:07:48 -0500 Subject: [PATCH 7/7] fix: remove unnecessary IncludeSymbols and IncludeSource parameters from dotnet pack command in Docker workflow --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a5b42a54..6f09edbe 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -103,7 +103,7 @@ jobs: } - name: Pack Solution run: | - dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}" /p:IncludeSymbols=true /p:IncludeSource=true + dotnet pack .\$($Env:SOLUTION_FILE).sln --configuration $env:BUILD_TYPE --output ./output /p:Version="${{ steps.setVersion.outputs.version }}" # Ensure CPZ files are included in the package $cpzFiles = Get-ChildItem -Path . -Recurse | Where-Object { $_.Extension -eq ".cpz" }