Skip to content

Commit c24d74d

Browse files
committed
fix script
1 parent 92243a9 commit c24d74d

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ on:
3030

3131
env:
3232
# Path to the project files relative to the root of the project.
33-
PROJECT_APP_PATH: TouchMax.csproj
34-
SCRIPT_TESTS_PATH: .\TestTouchMax.ps1
33+
PROJECT_APP_PATH: TouchMax\TouchMax.csproj
3534
DIRECTORY_BUILD_PROPS: .\Directory.Build.props
35+
FOLDER_TESTS_PATH: .\Tests
36+
SCRIPT_TESTS_PATH: .\TestTouchMax.ps1
3637

3738
# Configuration type to build.
3839
# You can convert this to a build matrix if you need coverage of multiple configuration types.
@@ -117,19 +118,19 @@ jobs:
117118
"${{ env.PROJECT_APP_PATH }}" `
118119
--configuration ${{ env.BUILD_CONFIGURATION }} `
119120
--no-restore `
120-
--property:OutputPath="${{ env:PUBLISH_FILES_PATH }}\"
121+
--property:OutputPath="${{ env.PUBLISH_FILES_PATH }}\"
121122
122123
- name: 💯 Run unit tests
123124
shell: pwsh
124125
run: |
125-
New-Item -ItemType Directory -Path "./tests" -Force
126-
Copy-Item -Path "${{ env:PUBLISH_FILES_PATH }}/*.exe" -Destination "./tests/" -Force
127-
if (-not (Test-Path "$env:SCRIPT_TESTS_PATH"))
126+
Copy-Item -Path "${{ env.PUBLISH_FILES_PATH }}\*.exe" -Destination "${{ env.FOLDER_TESTS_PATH }}\" -Force
127+
if (-not (Test-Path "${{ env.FOLDER_TESTS_PATH }}\${{ env.SCRIPT_TESTS_PATH }}"))
128128
{
129-
Write-Error "Test script not found: $env:SCRIPT_TESTS_PATH"
129+
Write-Error "Test script not found: ${{ env.FOLDER_TESTS_PATH }}\${{ env.SCRIPT_TESTS_PATH }}"
130130
exit 1
131131
}
132-
& "$env:SCRIPT_TESTS_PATH"
132+
Set-Location "${{ env.FOLDER_TESTS_PATH }}"
133+
& "${{ env.SCRIPT_TESTS_PATH }}"
133134
134135
build_publish:
135136
name: 📦 Build Standalone
@@ -150,7 +151,6 @@ jobs:
150151
dotnet publish `
151152
"${{ env.PROJECT_APP_PATH }}" `
152153
--configuration ${{ env.BUILD_CONFIGURATION }} `
153-
--framework=net10.0-windows `
154154
--no-restore `
155155
--property:Platform=x64 `
156156
--property:RuntimeIdentifier=win-x64 `
@@ -159,7 +159,7 @@ jobs:
159159
--property:PublishReadyToRun=false `
160160
--property:PublishTrimmed=false `
161161
--property:PublishSingleFile=true `
162-
--property:PublishDir="${{ env.PUBLISH_FILES_PATH }}\local"
162+
--property:PublishDir="${{ env.PUBLISH_FILES_PATH }}\local\"
163163
164164
- name: 📦 Zip and delete standalone folder
165165
working-directory: ${{ env.PUBLISH_FILES_PATH_LINUX }}

devtools/BuildMsStore.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ setlocal
134134
for %%I in ("%TARGET_EXE_PATH%") do set "EXEDIR=%%~dpI"
135135
set PATH=%EXEDIR%;%PATH%
136136
powershell -NoLogo -NoProfile -Command ^
137-
"Set-Location '%FOLDER_TESTS_PATH%' ; %SCRIPT_TESTS_PATH%"
137+
"Set-Location '%FOLDER_TESTS_PATH%' ; & '%SCRIPT_TESTS_PATH%'"
138138
endlocal
139139

140140
::
@@ -155,7 +155,7 @@ dotnet publish ^
155155
--property:PublishReadyToRun=false ^
156156
--property:PublishTrimmed=false ^
157157
--property:PublishSingleFile=true ^
158-
--property:PublishDir="%PUBLISH_FILES_PATH%"
158+
--property:PublishDir="%PUBLISH_FILES_PATH%\"
159159

160160
if errorlevel 1 exit /b %ERRORLEVEL%
161161

0 commit comments

Comments
 (0)