mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-13 18:07:20 -06:00
Refine build cleanup and script variable handling
Updates the build process to remove any existing Apps.iso during cleanup, ensuring a fresh build without stale artifacts. Clarifies in the app script template that configuration variables are treated as strings. The examples are updated to reflect this, preventing potential errors in custom scripts when checking for boolean-like values.
This commit is contained in:
@@ -38,6 +38,8 @@ else {
|
||||
|
||||
# Example of how to use the AppsScriptVariables hashtable to control script execution
|
||||
|
||||
# Note: The UI saves the values as strings, so if you type true for a value, it'll save to the config file as a string, not boolean
|
||||
|
||||
# Example: Check if a variable named 'foo' is set to string 'bar' and run a script accordingly
|
||||
# if ($AppsScriptVariables['foo'] -eq 'bar') {
|
||||
# Write-Host "Foo would have installed"
|
||||
@@ -46,8 +48,8 @@ else {
|
||||
# Write-Host "Foo would not have installed"
|
||||
# }
|
||||
|
||||
# Example: Check if a variable named 'foo' is set to boolean $true and run a script accordingly
|
||||
# if ($AppsScriptVariables[Teams] -eq $true) {
|
||||
# Example: Check if a variable named 'Teams' is set to string 'true' and run a script accordingly
|
||||
# if ($AppsScriptVariables['Teams'] -eq 'true') {
|
||||
# Write-Host "Teams would have been installed"
|
||||
# }
|
||||
# else {
|
||||
@@ -55,5 +57,4 @@ else {
|
||||
# }
|
||||
|
||||
# Your code below here
|
||||
|
||||
Write-Host 'Invoke-AppsScript.ps1 finished'
|
||||
@@ -3501,7 +3501,13 @@ function Get-FFUEnvironment {
|
||||
Remove-Item -Path $KBPath -Recurse -Force -ErrorAction SilentlyContinue
|
||||
WriteLog 'Removal complete'
|
||||
}
|
||||
Writelog 'Removing dirty.txt file'
|
||||
# Remove existing Apps.iso
|
||||
if (Test-Path -Path $AppsISO) {
|
||||
WriteLog "Removing $AppsISO"
|
||||
Remove-Item -Path $AppsISO -Force -ErrorAction SilentlyContinue
|
||||
WriteLog 'Removal complete'
|
||||
}
|
||||
WriteLog 'Removing dirty.txt file'
|
||||
Remove-Item -Path "$FFUDevelopmentPath\dirty.txt" -Force
|
||||
WriteLog "Cleanup complete"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user