Skip to content

Commit

Permalink
Add details for created/modified dates and sort the output of git log
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Mar 15, 2024
1 parent 59c884a commit 0c5fc1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PwshSpectreConsole.Docs/src/powershell/Helpers.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function Get-GitCommitDatesForHashFile {
$hashfileName = "_" + ($doc.Name -replace '.md$', '.sha256')
$gitHashfileName = Join-Path $group.Name $hashfileName
$dates = git log --follow --pretty="format:%ci" -- $gitHashfileName
return $dates
return $dates | Sort-Object -Descending
} finally {
Pop-Location
}
Expand Down
1 change: 1 addition & 0 deletions PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ foreach ($doc in $docs) {
} elseif (((Get-Date) - ([datetime]$modified)).TotalDays -lt $recentThresholdDays) {
$tag = "Updated"
}
Write-Host "File $($doc.Name) was last modified on $modified and created on $created, using tag $tag"

# Add the tag to the top of the file
if($tag) {
Expand Down

0 comments on commit 0c5fc1e

Please sign in to comment.