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

(GH-563) Merge PowerShell Scripts into shippable Modules on build #565

Merged
merged 6 commits into from
Jun 30, 2024

Conversation

mwallner
Copy link
Member

@mwallner mwallner commented Jun 27, 2024

Description Of Changes

Added a 'INCLUDE directive' that allows to include content of arbitrary files into the Boxstarter .psm1 modules.

Previously, the modules have been shipped together with a bunch of .ps1-files that have been dot-sourced when loading the module:

Resolve-Path $PSScriptRoot\*.ps1 | % { . $_.ProviderPath }

With this changes, it's possible to do something like the following:

# --- INCLUDE *.ps1

Motivation and Context

  • only need to sign the psm1 files on build
  • fewer artifacts to ship
  • better module-loading times

Testing

WIP / so far no issues

  • choco install
  • initial bootstrapping
  • Install-BoxstarterPackage
  • ...

Operating Systems Testing

WIP / so far no issues

  • Sever 2019 (vagrant box)

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?

Related Issue

Fixes #563

@mwallner mwallner added this to the 3.1.0 milestone Jun 27, 2024
@mwallner mwallner self-assigned this Jun 27, 2024
@mwallner mwallner marked this pull request as draft June 27, 2024 16:37
@mwallner mwallner requested review from pauby and flcdrg June 27, 2024 16:37
@mwallner mwallner changed the title Merge PowerShell Scripts into shippable Modules on build (GH-563) Merge PowerShell Scripts into shippable Modules on build Jun 27, 2024
@mwallner mwallner marked this pull request as ready for review June 28, 2024 19:09
@mwallner
Copy link
Member Author

Not really important but also in this PR: I've added the possibility to build Boxstarter on a Linux system (given the chocolatey/choco docker image is present) - so that I can do some work on Boxstarter when I've only got my laptop with me 😄

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.

Merge individual function scripts into a PowerShell module file
2 participants