From ab2c87b785036a872e17eac771c65a4af88790e5 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 9 Jan 2026 21:13:03 +0800 Subject: Change to script directory before build --- deploy.ps1 | 5 +++++ deploy.sh | 3 +++ 2 files changed, 8 insertions(+) diff --git a/deploy.ps1 b/deploy.ps1 index 643cc5f..e247395 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,5 +1,10 @@ # Require : Cargo (Rust), ISCC (Inno Setup) +# Set location to script directory +$scriptPath = $MyInvocation.MyCommand.Path +$scriptDir = Split-Path $scriptPath -Parent +Set-Location $scriptDir + # Hide .cargo and .temp directories before build if (Test-Path .cargo) { attrib +h .cargo diff --git a/deploy.sh b/deploy.sh index 22f3cb3..a4e533f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -2,6 +2,9 @@ # Require : Cargo (Rust) +# Change to the directory where the script is located +cd "$(dirname "$0")" || exit 1 + # Build if FORCE_BUILD=$(date +%s) cargo build --workspace --release; then # Export -- cgit