Skip to content

Commit

Permalink
updated xml check to LastWriteTime
Browse files Browse the repository at this point in the history
  • Loading branch information
techthoughts2 committed Dec 13, 2023
1 parent 4d5d53f commit af8e7f8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Module Changes
- Updated module requirement for `Convert` from `0.6.0` to `1.5.0`
- Minor updates to `Invoke-XMLDataCheck` for code readability
- `Confirm-XMLDataSet` now evaluates `LastWriteTime` instead of `CreationTime` to determine cache freshness requirements
- Build Updates
- Updated all Github action files to:
- support ignore certain files for Readthedocs implementation
Expand Down
2 changes: 1 addition & 1 deletion docs/pwshCloudCommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module Name: pwshCloudCommands
Module Guid: be3705bf-2c38-413a-8973-9e409e826d35
Download Help Link: NA
Help Version: 0.9.0
Help Version: 0.9.5
Locale: en-US
---

Expand Down
2 changes: 2 additions & 0 deletions src/Tests/Unit/Private/Confirm-XMLDataSet.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ InModuleScope 'pwshCloudCommands' {
CreationTime = [datetime]'01/06/20 21:17:21'
CreationTimeUtc = [datetime]'01/07/20 05:17:21'
LastAccessTime = [datetime]'01/06/20 21:17:22'
LastWriteTime = [datetime]'01/06/20 21:17:21'
}
} #endMock
Mock -CommandName Get-Date -MockWith {
Expand Down Expand Up @@ -84,6 +85,7 @@ InModuleScope 'pwshCloudCommands' {
CreationTime = [datetime]'01/06/20 21:17:21'
CreationTimeUtc = [datetime]'01/07/20 05:17:21'
LastAccessTime = [datetime]'01/06/20 21:17:22'
LastWriteTime = [datetime]'01/06/20 21:17:21'
}
return $obj
}
Expand Down
2 changes: 1 addition & 1 deletion src/pwshCloudCommands/Private/Confirm-XMLDataSet.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Confirm-XMLDataSet {
return $result
}
if ($fileData) {
$creationDate = $fileData.CreationTime
$creationDate = $fileData.LastWriteTime
$now = Get-Date
if (($now - $creationDate).Days -ge 9) {
Write-Verbose 'Data file requires refresh.'
Expand Down
2 changes: 1 addition & 1 deletion src/pwshCloudCommands/pwshCloudCommands.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'pwshCloudCommands.psm1'

# Version number of this module.
ModuleVersion = '0.9.0'
ModuleVersion = '0.9.5'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down

0 comments on commit af8e7f8

Please sign in to comment.