Skip to content

feat(include): add versioning and date management for include files#59

Open
rulasg wants to merge 8 commits into
mainfrom
addheadertoimports
Open

feat(include): add versioning and date management for include files#59
rulasg wants to merge 8 commits into
mainfrom
addheadertoimports

Conversation

@rulasg

@rulasg rulasg commented Jun 24, 2026

Copy link
Copy Markdown
Owner
  • feat(include): add version and date to include file output

  • chore(header): update version and date in MyWrite.ps1

  • fix(datehelper): update command aliases for date retrieval functions

  • feat(versioning): implement version header management for include files

  • feat(alias): add aliases for Add-IncludeToWorkspace and Get-IncludeFile functions

  • fix(header): update version and date in MyWrite.ps1

  • fix(setfileversion): update parameter attributes for Set-IncludeFileVersion function

  • chore(header): update header comments in functionParameterHelper.ps1

Comment thread public/setfileversion.ps1
[string]$Path,
[string]$Version,
[string]$Date
[parameter(Mandatory,ValueFromPipelineByPropertyName)][string]$Path,
} else {
$newVersionHeader = Build-VersionHeader -Version "1.0.0" -Source $sourceModuleRootPath
}

Comment thread public/githelper.ps1
process {
try {
if ([string]::IsNullOrWhiteSpace($Path)) {
return $false
Comment thread public/githelper.ps1
}

if (-not (Test-Path -LiteralPath $candidateDir -PathType Container)) {
return $false
Comment thread public/githelper.ps1

$repoRoot = (& git -C $candidateDir rev-parse --show-toplevel 2>$null | Select-Object -First 1)
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($repoRoot)) {
return $false
Comment thread public/githelper.ps1

$repoRootFull = [System.IO.Path]::GetFullPath($repoRoot)
if ($absolutePath -notlike "$repoRootFull*") {
return $false
Comment thread public/githelper.ps1
$relativePath = [System.IO.Path]::GetRelativePath($repoRootFull, $absolutePath)
$status = (& git -C $repoRootFull status --porcelain -- $relativePath 2>$null)

return -not [string]::IsNullOrWhiteSpace(($status | Out-String).Trim())
Comment thread public/githelper.ps1
return -not [string]::IsNullOrWhiteSpace(($status | Out-String).Trim())
}
catch {
return $false
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