Files
ICCery/sign.cmd
gronod b93ea5d933
Build Windows Packages / Build Windows (push) Canceled after 4m51s
Build Linux Packages / Build Linux (push) Canceled after 4m54s
fix(ci): make sign.cmd path-agnostic across working directories and add workspace to GITHUB_PATH in Windows CI
2026-09-01 21:43:39 +01:00

24 lines
914 B
Batchfile

@echo off
setlocal
set "TARGET=%~1"
if "%TARGET%"=="" (
echo [sign.cmd] Error: No target file specified.
exit /b 1
)
:: Find sign-windows.ps1
set "SCRIPT_PATH="
if exist "%~dp0sign-windows.ps1" set "SCRIPT_PATH=%~dp0sign-windows.ps1"
if not defined SCRIPT_PATH if exist "%~dp0scripts\sign-windows.ps1" set "SCRIPT_PATH=%~dp0scripts\sign-windows.ps1"
if not defined SCRIPT_PATH if exist "%~dp0..\scripts\sign-windows.ps1" set "SCRIPT_PATH=%~dp0..\scripts\sign-windows.ps1"
if not defined SCRIPT_PATH if exist "scripts\sign-windows.ps1" set "SCRIPT_PATH=scripts\sign-windows.ps1"
if not defined SCRIPT_PATH if exist "..\scripts\sign-windows.ps1" set "SCRIPT_PATH=..\scripts\sign-windows.ps1"
if not defined SCRIPT_PATH (
echo [sign.cmd] Error: sign-windows.ps1 could not be found.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_PATH%" "%TARGET%"
exit /b %ERRORLEVEL%