Skip to content

Commit bf1fc8f

Browse files
committed
updated script
1 parent 61273f1 commit bf1fc8f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/template-publish.yml

+12-8
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ jobs:
229229
}
230230
231231
- name: Test template package
232+
shell: pwsh
232233
run: |
233234
dotnet new install ./nupkg/CleanArchitecture.FullStack.Template.${{ env.TEMPLATE_VERSION }}.nupkg
234235
mkdir test-project
@@ -240,26 +241,29 @@ jobs:
240241
# Get full help to see available parameters
241242
dotnet new cleanarch-fullstack --help
242243
243-
# Try multiple parameter formats to see which one works
244-
# First try with standard --param value format
245-
dotnet new cleanarch-fullstack --Organization TestCompany --ProjectName TestProject || (
246-
# If that fails, try with -p:param=value format (newer .NET SDK style)
247-
echo "Standard parameter format failed, trying -p: format..."
244+
# Try with standard format first
245+
$result = dotnet new cleanarch-fullstack --Organization TestCompany --ProjectName TestProject
246+
# If that fails, try with -p: format
247+
if (-not $?) {
248+
Write-Host "Standard parameter format failed, trying -p: format..."
248249
dotnet new cleanarch-fullstack -p:Organization=TestCompany -p:ProjectName=TestProject
249-
)
250+
}
250251
251252
# List files to verify creation
252253
dir
253254
254255
- name: Test template package with organization
256+
shell: pwsh
255257
run: |
256258
mkdir test-project-with-org
257259
cd test-project-with-org
258260
259261
# Create project with fallback options
260-
dotnet new cleanarch-fullstack --organization TestCompany --projectName TestProjectWithOrg || (
262+
dotnet new cleanarch-fullstack --organization TestCompany --projectName TestProjectWithOrg
263+
if (-not $?) {
264+
Write-Host "Trying alternative parameter format"
261265
dotnet new cleanarch-fullstack -p:Organization=TestCompany -p:ProjectName=TestProjectWithOrg
262-
)
266+
}
263267
264268
# List files to verify creation
265269
dir

0 commit comments

Comments
 (0)