Adds Powershell scripts to tools.
This commit is contained in:
20
tools/powershell/Build-Plugin.ps1
Normal file
20
tools/powershell/Build-Plugin.ps1
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
# Set strict mode for better error handling
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Find project root (two directories above this script)
|
||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$ProjectRoot = Split-Path -Parent (Split-Path -Parent $ScriptDir)
|
||||
|
||||
# Save current location and change to project root
|
||||
Push-Location $ProjectRoot
|
||||
|
||||
try {
|
||||
# Build the project using Gradle
|
||||
& ".\gradlew.bat" build
|
||||
} finally {
|
||||
# Always restore the original location
|
||||
Pop-Location
|
||||
}
|
||||
Reference in New Issue
Block a user