gaelcolas / Sampler

Module template with build pipeline and examples, including DSC elements.
MIT License
171 stars 42 forks source link

Make template SimpleModule better #412

Closed johlju closed 1 year ago

johlju commented 1 year ago

Pull Request

Pull Request (PR) description

Changed

Fixed

Task list


This change is Reviewable

johlju commented 1 year ago

This makes it easier to create a simple module that can be built and tested when answering No (default value) on all questions.

PS> New-SampleModule -DestinationPath '.' -ModuleType 'SimpleModule' -ModuleAuthor 'Johan Ljunggren' -ModuleName 'ExampleModuleDsc' -ModuleDescription 'My description.'                                                                    
Will you use Git for source control?
[Y] Yes  [N] No  [?] Help (default is "N"): 
Do you want to use Azure Pipelines to run the the build, test and or deploy pipeline?
[Y] Yes  [N] No  [?] Help (default is "N"): 
Will you use Visual Studio Code as the code editor for the project?
[Y] Yes  [N] No  [?] Help (default is "N"): 
Destination path: /Users/johlju/source
   Create ExampleModuleDsc/source/
   Create ExampleModuleDsc/source/Private/
   Create ExampleModuleDsc/source/Public/
   Create ExampleModuleDsc/tests/
   Create ExampleModuleDsc/tests/QA/module.tests.ps1
   Create ExampleModuleDsc/output/
   Create ExampleModuleDsc/output/RequiredModules/
   Create ExampleModuleDsc/build.ps1
   Create ExampleModuleDsc/RequiredModules.psd1
   Create ExampleModuleDsc/Resolve-Dependency.ps1
   Create ExampleModuleDsc/Resolve-Dependency.psd1
   Create ExampleModuleDsc/build.yaml
   Create ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Create ExampleModuleDsc/source/ExampleModuleDsc.psm1
   Create ExampleModuleDsc/README.md
   Create ExampleModuleDsc/source/en-US/about_ExampleModuleDsc.help.txt
   Create ExampleModuleDsc/CHANGELOG.md

If answering Yes on a question results in other questions to be asked, resulting in additional files will be added to the project.

PS> New-SampleModule -DestinationPath '.' -ModuleType 'SimpleModule' -ModuleAuthor 'Johan Ljunggren' -ModuleName 'ExampleModuleDsc' -ModuleDescription 'My description.'
Will you use Git for source control?
[Y] Yes  [N] No  [?] Help (default is "N"): Y
Name of your default branch (main): 
Do you want to add configuration for GitVersion to handle automatic versioning for your project?
[Y] Yes  [N] No  [?] Help (default is "Y"): 
Do you want to use the service CodeCov.io for code coverage reporting?
[Y] Yes  [N] No  [?] Help (default is "N"): Y
Will you use GitHub.com as the collaboration platform for the project?
[Y] Yes  [N] No  [?] Help (default is "N"): Y
Do you want to use Azure Pipelines to run the the build, test and or deploy pipeline?
[Y] Yes  [N] No  [?] Help (default is "N"): Y
What is the name of the GitHub owner (personal or organization account) that will publish the module? (MyOrgName): 
Will you use Visual Studio Code as the code editor for the project?
[Y] Yes  [N] No  [?] Help (default is "N"): Y
Destination path: /Users/johlju/source
   Create ExampleModuleDsc/source/
   Create ExampleModuleDsc/source/Private/
   Create ExampleModuleDsc/source/Public/
   Create ExampleModuleDsc/tests/
   Create ExampleModuleDsc/tests/QA/module.tests.ps1
   Create ExampleModuleDsc/output/
   Create ExampleModuleDsc/output/RequiredModules/
   Create ExampleModuleDsc/.gitignore
   Create ExampleModuleDsc/.gitattributes
   Create ExampleModuleDsc/build.ps1
   Create ExampleModuleDsc/RequiredModules.psd1
   Create ExampleModuleDsc/Resolve-Dependency.ps1
   Create ExampleModuleDsc/Resolve-Dependency.psd1
   Create ExampleModuleDsc/build.yaml
   Create ExampleModuleDsc/azure-pipelines.yml
   Create ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Modify ExampleModuleDsc/source/ExampleModuleDsc.psd1 into temp file before copying to destination
   Update ExampleModuleDsc/source/ExampleModuleDsc.psd1
   Create ExampleModuleDsc/source/ExampleModuleDsc.psm1
   Create ExampleModuleDsc/README.md
   Create ExampleModuleDsc/source/en-US/about_ExampleModuleDsc.help.txt
   Create ExampleModuleDsc/CHANGELOG.md
   Create ExampleModuleDsc/GitVersion.yml
   Create ExampleModuleDsc/.vscode/tasks.json
   Create ExampleModuleDsc/codecov.yml
johlju commented 1 year ago

@raandree might you have some time to help review this? Would love your input if there is more to be done that I missed.

codecov[bot] commented 1 year ago

Codecov Report

Merging #412 (02592c3) into main (2ac6eff) will decrease coverage by 1%. The diff coverage is n/a.

:exclamation: Current head 02592c3 differs from pull request most recent head 80ba5d0. Consider uploading reports for the commit 80ba5d0 to get more accurate results

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #412   +/-   ##
===================================
- Coverage    81%    81%   -1%     
===================================
  Files        44     42    -2     
  Lines      2317   2248   -69     
===================================
- Hits       1897   1835   -62     
+ Misses      420    413    -7     
Impacted Files Coverage Δ
Sampler/scripts/Set-SamplerTaskVariable.ps1 96% <0%> (-1%) :arrow_down:
.build/tasks/SetPsModulePath.build.ps1
Sampler/Public/Set-SamplerPSModulePath.ps1
johlju commented 1 year ago

Thanks for merging this!