@@ -12,6 +12,10 @@ param(
1212 [Alias (" UseAll" )]
1313 [switch ]$USE_ALL ,
1414
15+ [Parameter (Mandatory = $false )]
16+ [Alias (" IncludeDebug" )]
17+ [switch ]$INCLUDE_DEBUG ,
18+
1519 [Parameter (Mandatory = $false )]
1620 [Alias (" NoBuild" )]
1721 [switch ]$NO_BUILD ,
@@ -30,6 +34,7 @@ $COMMIT = git log --pretty=format:"%H" -1
3034# Output the selected options
3135Write-Host " Selected Options:"
3236Write-Host " Use all frameworks (-UseAll) $USE_ALL "
37+ Write-Host " Include debug builds (-IncludeDebug) $INCLUDE_DEBUG "
3338Write-Host " No build (-NoBuild) $NO_BUILD "
3439Write-Host " No archive (-NoArchive) $NO_ARCHIVE "
3540Write-Host " "
@@ -80,15 +85,15 @@ if (!$NO_BUILD.IsPresent) {
8085
8186 # Only .NET 5 and above can publish to a single file
8287 if ($SINGLE_FILE_CAPABLE -contains $FRAMEWORK ) {
83- # Only include Debug if building all
84- if ($USE_ALL .IsPresent ) {
88+ # Only include Debug if set
89+ if ($INCLUDE_DEBUG .IsPresent ) {
8590 dotnet publish ExtractionTool\ExtractionTool.csproj -f $FRAMEWORK - r $RUNTIME - c Debug -- self- contained true -- version- suffix $COMMIT - p:PublishSingleFile= true
8691 }
8792 dotnet publish ExtractionTool\ExtractionTool.csproj -f $FRAMEWORK - r $RUNTIME - c Release -- self- contained true -- version- suffix $COMMIT - p:PublishSingleFile= true - p:DebugType= None - p:DebugSymbols= false
8893 }
8994 else {
90- # Only include Debug if building all
91- if ($USE_ALL .IsPresent ) {
95+ # Only include Debug if set
96+ if ($INCLUDE_DEBUG .IsPresent ) {
9297 dotnet publish ExtractionTool\ExtractionTool.csproj -f $FRAMEWORK - r $RUNTIME - c Debug -- self- contained true -- version- suffix $COMMIT
9398 }
9499 dotnet publish ExtractionTool\ExtractionTool.csproj -f $FRAMEWORK - r $RUNTIME - c Release -- self- contained true -- version- suffix $COMMIT - p:DebugType= None - p:DebugSymbols= false
@@ -116,15 +121,15 @@ if (!$NO_BUILD.IsPresent) {
116121
117122 # Only .NET 5 and above can publish to a single file
118123 if ($SINGLE_FILE_CAPABLE -contains $FRAMEWORK ) {
119- # Only include Debug if building all
120- if ($USE_ALL .IsPresent ) {
124+ # Only include Debug if set
125+ if ($INCLUDE_DEBUG .IsPresent ) {
121126 dotnet publish ProtectionScan\ProtectionScan.csproj -f $FRAMEWORK - r $RUNTIME - c Debug -- self- contained true -- version- suffix $COMMIT - p:PublishSingleFile= true
122127 }
123128 dotnet publish ProtectionScan\ProtectionScan.csproj -f $FRAMEWORK - r $RUNTIME - c Release -- self- contained true -- version- suffix $COMMIT - p:PublishSingleFile= true - p:DebugType= None - p:DebugSymbols= false
124129 }
125130 else {
126- # Only include Debug if building all
127- if ($USE_ALL .IsPresent ) {
131+ # Only include Debug if set
132+ if ($INCLUDE_DEBUG .IsPresent ) {
128133 dotnet publish ProtectionScan\ProtectionScan.csproj -f $FRAMEWORK - r $RUNTIME - c Debug -- self- contained true -- version- suffix $COMMIT
129134 }
130135 dotnet publish ProtectionScan\ProtectionScan.csproj -f $FRAMEWORK - r $RUNTIME - c Release -- self- contained true -- version- suffix $COMMIT - p:DebugType= None - p:DebugSymbols= false
@@ -153,8 +158,8 @@ if (!$NO_ARCHIVE.IsPresent) {
153158 continue
154159 }
155160
156- # Only include Debug if building all
157- if ($USE_ALL .IsPresent ) {
161+ # Only include Debug if set
162+ if ($INCLUDE_DEBUG .IsPresent ) {
158163 Set-Location - Path $BUILD_FOLDER \ExtractionTool\bin\Debug\${FRAMEWORK} \${RUNTIME} \publish\
159164 if ($NON_DLL_FRAMEWORKS -contains $FRAMEWORK -or $NON_DLL_RUNTIMES -contains $RUNTIME ) {
160165 7z a - tzip - x' !CascLib.dll' - x' !mspack.dll' - x' !StormLib.dll' $BUILD_FOLDER \ExtractionTool_${FRAMEWORK} _ ${RUNTIME} _debug.zip *
@@ -192,8 +197,8 @@ if (!$NO_ARCHIVE.IsPresent) {
192197 continue
193198 }
194199
195- # Only include Debug if building all
196- if ($USE_ALL .IsPresent ) {
200+ # Only include Debug if set
201+ if ($INCLUDE_DEBUG .IsPresent ) {
197202 Set-Location - Path $BUILD_FOLDER \ProtectionScan\bin\Debug\${FRAMEWORK} \${RUNTIME} \publish\
198203 if ($NON_DLL_FRAMEWORKS -contains $FRAMEWORK -or $NON_DLL_RUNTIMES -contains $RUNTIME ) {
199204 7z a - tzip - x' !CascLib.dll' - x' !mspack.dll' - x' !StormLib.dll' $BUILD_FOLDER \ProtectionScan_${FRAMEWORK} _ ${RUNTIME} _debug.zip *
0 commit comments