add more scripts to automatically update:
- last updated elx file - all elx files
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
function Save-ElxInternals {
|
||||
param(
|
||||
[ValidateScript({ Test-Path $_ -PathType Leaf })][Parameter(Mandatory)]$ModulePath
|
||||
)
|
||||
|
||||
Write-Host "Switching to ELX Tools directory..."
|
||||
|
||||
$extractElxToolsScriptPath = Join-Path $PSScriptRoot "../tools/extract-elx/"
|
||||
Push-Location -StackName ElxTools $extractElxToolsScriptPath
|
||||
|
||||
Write-Host "Installing Node.js dependencies for the ELX Tools..."
|
||||
|
||||
# Install Node.js dependencies for the ELX Tools
|
||||
& npm install
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "npm install failed with exit code $LASTEXITCODE."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Node.js dependencies installed successfully!" -ForegroundColor Cyan
|
||||
Write-Host "Executing ELX extraction..."
|
||||
|
||||
& node "extract-elx.js" $ModulePath --clean
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "ELX extraction failed with exit code $LASTEXITCODE."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "ELX extraction completed successfully!" -ForegroundColor Green
|
||||
Write-Host "Switching back to original directory..."
|
||||
|
||||
Pop-Location -StackName ElxTools
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function Save-ElxInternals
|
||||
Reference in New Issue
Block a user