Skip to content
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

Merged
merged 4 commits into from
Feb 28, 2024
Merged

Changes to be used with Intune #573

merged 4 commits into from
Feb 28, 2024

Conversation

Romanitho
Copy link
Owner

@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

@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
Copy link
Contributor

github-actions bot commented Feb 23, 2024

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
⚠️ COPYPASTE jscpd yes 9 2.33s
✅ POWERSHELL powershell 1 0 2.88s
✅ POWERSHELL powershell_formatter 1 0 2.44s
⚠️ REPOSITORY checkov yes 1 16.64s
⚠️ REPOSITORY 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
⚠️ SPELL 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

MegaLinter is graciously provided by OX Security

Copy link
Owner Author

@Romanitho Romanitho left a 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
}
Copy link
Owner Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember

Copy link
Contributor

@KnifMelti KnifMelti Feb 26, 2024

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...

Copy link
Contributor

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

Copy link
Owner Author

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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KnifMelti and here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se comment above...

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Romanitho Romanitho merged commit 83e8a79 into main Feb 28, 2024
3 checks passed
@Romanitho Romanitho deleted the clean branch February 28, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants