-
Notifications
You must be signed in to change notification settings - Fork 141
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
Changes to be used with Intune #573
Conversation
@KnifMelti I made few adjustments to allow mods to be put inside Intunewim package. This way, we can run install command with `%programdata%\Winget-AutoUpdate\Winget-Install.ps1` and it should copy mods from the intunewim to the WAU mod location
🦙 MegaLinter status:
|
Descriptor | Linter | Files | Fixed | Errors | Elapsed time |
---|---|---|---|---|---|
jscpd | yes | 9 | 2.33s | ||
✅ POWERSHELL | powershell | 1 | 0 | 2.88s | |
✅ POWERSHELL | powershell_formatter | 1 | 0 | 2.44s | |
checkov | yes | 1 | 16.64s | ||
devskim | yes | 11 | 3.55s | ||
✅ REPOSITORY | dustilock | yes | no | 0.01s | |
✅ REPOSITORY | gitleaks | yes | no | 1.67s | |
✅ REPOSITORY | git_diff | yes | no | 0.01s | |
✅ REPOSITORY | grype | yes | no | 12.0s | |
✅ REPOSITORY | kics | yes | no | 1.61s | |
✅ REPOSITORY | secretlint | yes | no | 1.07s | |
✅ REPOSITORY | syft | yes | no | 0.45s | |
✅ REPOSITORY | trivy | yes | no | 4.54s | |
✅ REPOSITORY | trivy-sbom | yes | no | 2.99s | |
✅ REPOSITORY | trufflehog | yes | no | 8.1s | |
cspell | 2 | 21 | 3.32s |
See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true
in mega-linter.yml to validate all sources, not only the diff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KnifMelti I made few changes, could you tell me if I didn't break anything? 😅
#Add mods | ||
Write-ToLog "-> Add modifications for $AppID to WAU 'mods'" | ||
Copy-Item ".\mods\$AppID-*" -Destination "$Mods" -Exclude "*installed-once*", "*uninstall*" -Force | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KnifMelti could you remind me why you exclude *uninstall*
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Romanitho
Because from Winget-Install.ps1
it's the only time an uninstallation occurs, and that was a separate Repo.
WAU only handles Mods for -preinstall
, -upgrade
, -install
, -installed
or -notinstalled
itself.
Or, at least, that's what my memory tells me...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My own way of using Mods in our production environment is to have centralized management (Web server) handling all Mods, nothing at all in Winget-Install.ps1
source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thanks
if (Test-Path "$Mods\$AppID*") { | ||
Write-ToLog "-> Remove $AppID modifications from WAU 'mods'" | ||
#Remove mods | ||
Remove-Item -Path "$Mods\$AppID-*" -Exclude "*uninstall*" -Force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KnifMelti and here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se comment above...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@KnifMelti
I made few adjustments to allow mods to be put inside Intunewim package. This way, we can run install command with
%programdata%\Winget-AutoUpdate\Winget-Install.ps1
and it should copy mods from the intunewim to the WAU mod location