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

Add custom and builtin place holders replacement functionality #26

Merged
merged 32 commits into from
Aug 14, 2024

Conversation

PrzemyslawKlys
Copy link
Member

This PR adds:

  • Ability to define custom place holders:
New-ConfigurationPlaceHolder -Find '{CustomName1}' -Replace 'SpecialCase1'
New-ConfigurationPlaceHolder -Find '{CustomName2}' -Replace 'SpecialCase2'

Or

New-ConfigurationPlaceHolder -CustomReplacement @(
        @{ Find = '{CustomName}'; Replace = 'SpecialCase' }
        @{ Find = '{CustomVersion}'; Replace = '1.0.0' }
)
  • It also has builtin place holders replacement:

Current known replacements are:

<ModuleName> / {ModuleName} - the name of the module i.e PSPublishModule
<ModuleVersion> / {ModuleVersion} - the version of the module i.e 1.0.0
<ModuleVersionWithPreRelease> / {ModuleVersionWithPreRelease} - the version of the module with pre-release tag i.e 1.0.0-Preview1
<TagModuleVersionWithPreRelease> / {TagModuleVersionWithPreRelease} - the version of the module with pre-release tag i.e v1.0.0-Preview1
<TagName> / {TagName} - the name of the tag - i.e. v1.0.0

That means it's not necessary to define custom code with that, just use known replacements

@PrzemyslawKlys PrzemyslawKlys merged commit 3d1f926 into master Aug 14, 2024
0 of 3 checks passed
@PrzemyslawKlys PrzemyslawKlys deleted the PlaceHolders branch August 14, 2024 19:04
@SamErde
Copy link
Contributor

SamErde commented Aug 15, 2024

Thanks, Przemek!

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.

2 participants