You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently AU plugins run at the end and there is a single BeforeAfter script that can be set in updateall options.
It should be possible to define plugins that run before/after each package in the same way. AU can known which plugin to run at the end and which in between based on plugin file system location.
This would allow for creation of more interesting plugins:
Attribute setter
Define what package attributes are automatically set - very useful for setting package source url, icon url, adding user among maintainers etc. With it migration of packages between AU repositories would be true file copy.
Guideliness checker
Could be run to check powershell style etc.
Deleyer
#94 could be done as this type of plugin that would save latest version in a file and wait for delay to pass
VirusTotal
#84 can be done as plugin.
Grammar
Can be used to automatically check for spelling errors.
Details
Plugin would need to get [AUPackage]. It could determine if its invocation is before or after package update based on its fields.
Plugin should have an option to get output of previous plugin that did run on package
Plugin should have an option to reference stuff
Plugins could be run only in updateall context. update should never support them as updateall can be used to run single package.
Global before/after scripts should run before/after all plugins.
Files used by plugins should be saved by git plugin automatically (and streams json along the way).
Example
AttributeSetter =@{
packageSourceUrl= { 'https://github.../$this_repo/automatic/$Name' }
owners= { 'chocolatey, '+ ($owners-replace'chocolatey,?' }
description = { $description+"`n`nAutomatic package by majkinetor" }
}
MetadataChecker =@{
Tags= { Compare-Object$mandatory_tags ($Tags-split'') ... }
licenseUrl=$truefiles= { if (ls $Package.Path VERIFICATION) { $files-contains'legal' } }
}
Ignorant =@{
err=60# rise ignored to error after 60 days'clover'='Disabled due virustotal results''pkg'='Disabled due to no maintainers'
}
Deleyer =@{
'*'=2# 2 days latency for all packagesclover=14# specific package latency
}
VirusTotal =@{ Threshold=5#report errors after this many positives }Enforcer=@{ForcedPackages=$ForcedPackages}
Currently AU plugins run at the end and there is a single BeforeAfter script that can be set in updateall options.
It should be possible to define plugins that run before/after each package in the same way. AU can known which plugin to run at the end and which in between based on plugin file system location.
This would allow for creation of more interesting plugins:
Define what package attributes are automatically set - very useful for setting package source url, icon url, adding user among maintainers etc. With it migration of packages between AU repositories would be true file copy.
Could be run to check powershell style etc.
#94 could be done as this type of plugin that would save latest version in a file and wait for delay to pass
#84 can be done as plugin.
Can be used to automatically check for spelling errors.
Details
[AUPackage]
. It could determine if its invocation is before or after package update based on its fields.update
should never support them as updateall can be used to run single package.Example
/cc @AdmiringWorm
Issue migrated from majkinetor/au#116
The text was updated successfully, but these errors were encountered: