-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate AppDeployToolkitExtensions.ps1 from v3 to v4 #5
Comments
I will look into adding support for this - in the meantime you can try experimenting with this: $CustomRulePath = "$((Get-Module PSAppDeployToolkit.Tools -ListAvailable).ModuleBase)\PSScriptAnalyzer\Measure-ADTCompatibility.psm1"
Invoke-ScriptAnalyzer -Path <PathToExtensionsFile> -CustomRulePath $CustomRulePath To list the changes, and add |
I did try the code you gave. Without the -Fix it indeed shows all the issues like it should. But with the -Fix the issues are not corrected in the file and I don't see what i am doing wrong here. I am using the following PS version. Name Value PSVersion 5.1.22621.4391 With these modules loaded. Name Version PSAppDeployToolkit 4.0.4 This is the commandline I am using as you suggested. I tested a bit more and when I have a plain ps1 file without functions defined it works ok. ##=============================================== Write-Log -Message "This one is not in a function." ##=============================================== But as soon that one function is defined then the conversion is not done. Write-Log -Message "This one is not in a function." function Set-LogMessage-Test { ##=============================================== |
Summary of the new feature / enhancement
With the Convert-ADTDeployment you can convert Deploy-Application.ps1 files. But we have lot of home brew functions in AppDeployToolkitExtensions.ps1 . when trying to convert that it gives an error "Convert-ADTDeployment : The expected if statement was not found in the input script."
Can the convert function be changed so that it is also possible to convert the extensions.ps1. I realize that we will have to do some specific work on it but if this functions could do the bulk then that would be amazing for us.
v4, nice work by the way.
Proposed technical implementation details (optional)
No response
The text was updated successfully, but these errors were encountered: