mzball-dt / dynatrace-pwsh

Script utilities for making life easy
2 stars 9 forks source link

Make it easier to maintain the 'scaffold' part of each script #14

Open mzball-dt opened 3 years ago

mzball-dt commented 3 years ago

With so much duplication between the scripts it is currently difficult to apply and manage bug fixes or feature enhancements across them all.

This could be resolved with some sort of automation process? A Template structure that either fills the scripts or replaces parts of the scripts based on a central point.

Example: Demarcate the standard parts of the scripts with a %% Start X Region %% and %% Stop X Region %% and then replace those regions with the contents of a snippet.X.region.ps1 file that's kept in the helpers folder.

mzball-dt commented 3 years ago

I'm not too keen on giving up the benefit of having scripts that have no dependencies. An alternate solution to this would be to create a Powershell Module and use it's module loading dependency system. This would change the easy - copy/paste/run work flow into something closer to 'install/run'.