feat(include): add versioning and date management for include files#59
Open
rulasg wants to merge 8 commits into
Open
feat(include): add versioning and date management for include files#59rulasg wants to merge 8 commits into
rulasg wants to merge 8 commits into
Conversation
| [string]$Path, | ||
| [string]$Version, | ||
| [string]$Date | ||
| [parameter(Mandatory,ValueFromPipelineByPropertyName)][string]$Path, |
| } else { | ||
| $newVersionHeader = Build-VersionHeader -Version "1.0.0" -Source $sourceModuleRootPath | ||
| } | ||
|
|
| process { | ||
| try { | ||
| if ([string]::IsNullOrWhiteSpace($Path)) { | ||
| return $false |
| } | ||
|
|
||
| if (-not (Test-Path -LiteralPath $candidateDir -PathType Container)) { | ||
| return $false |
|
|
||
| $repoRoot = (& git -C $candidateDir rev-parse --show-toplevel 2>$null | Select-Object -First 1) | ||
| if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($repoRoot)) { | ||
| return $false |
|
|
||
| $repoRootFull = [System.IO.Path]::GetFullPath($repoRoot) | ||
| if ($absolutePath -notlike "$repoRootFull*") { | ||
| return $false |
| $relativePath = [System.IO.Path]::GetRelativePath($repoRootFull, $absolutePath) | ||
| $status = (& git -C $repoRootFull status --porcelain -- $relativePath 2>$null) | ||
|
|
||
| return -not [string]::IsNullOrWhiteSpace(($status | Out-String).Trim()) |
| return -not [string]::IsNullOrWhiteSpace(($status | Out-String).Trim()) | ||
| } | ||
| catch { | ||
| return $false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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