Skip to content

Commit 703df2b

Browse files
Merge pull request #13 from PowerShell/dev
Merging release pull request
2 parents c0a8d05 + e0ada16 commit 703df2b

File tree

4 files changed

+45
-16
lines changed

4 files changed

+45
-16
lines changed

DscResources/MSFT_xWindowsUpdate/MSFT_xWindowsUpdate.psm1

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,8 @@ function Get-TargetResource
6464
$uri, $kbId = Validate-StandardArguments -Path $Path -Id $Id
6565

6666
Write-Verbose $($LocalizedData.GettingHotfixMessage -f ${Id})
67-
68-
$PSBoundParameters.Remove('Id')
6967

70-
$hotfix = Get-HotFix -Id "KB$kbId" @PSBoundParameters
68+
$hotfix = Get-HotFix -Id "KB$kbId"
7169

7270
$returnValue = @{
7371
Path = ''
@@ -174,14 +172,14 @@ function Set-TargetResource
174172

175173
}
176174

177-
if ($LASTEXITCODE -eq 3010)
175+
if (Test-Path -Path 'variable:\LASTEXITCODE')
178176
{
179-
# reboot machine if exitcode indicates reboot.
180-
# This seems to be broken
181-
$global:DSCMachineStatus = 1
177+
if ($LASTEXITCODE -eq 3010)
178+
{
179+
# reboot machine if exitcode indicates reboot.
180+
$global:DSCMachineStatus = 1
181+
}
182182
}
183-
184-
185183
}
186184

187185

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build status](https://ci.appveyor.com/api/projects/status/t4bw4lnmxy1dg3ys/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/xwindowsupdate/branch/master)
1+
[![Build status](https://ci.appveyor.com/api/projects/status/t4bw4lnmxy1dg3ys/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/xwindowsupdate/branch/master)
22

33
# xWindowsUpdate
44

@@ -26,6 +26,13 @@ If no log is used, a temporary log name is created by the resource.
2626

2727
## Versions
2828

29+
### Unreleased
30+
31+
### 2.3.0.0
32+
33+
* MSFT_xWindowsUpdate: Fixed an issue in the Get-TargetResource function, resulting in the Get-DscConfiguration cmdlet now working appropriately when the resource is applied.
34+
* MSFT_xWindowsUpdate: Fixed an issue in the Set-TargetResource function that was causing the function to fail when the installation of a hotfix did not provide an exit code.
35+
2936
### 2.2.0.0
3037

3138
* Minor fixes
@@ -49,7 +56,7 @@ If the hotfix with the required hotfix ID is already present on the system, the
4956
```powershell
5057
Configuration UpdateWindowsWithPath
5158
{
52-
Node ‘NodeName’
59+
Node ‘NodeName’
5360
{
5461
xHotfix HotfixInstall
5562
{
@@ -68,7 +75,7 @@ This configuration will install the hotfix from a URI that is connected to a par
6875
```powershell
6976
Configuration UpdateWindowsWithURI
7077
{
71-
Node ‘NodeName’
78+
Node ‘NodeName’
7279
{
7380
xHotfix HotfixInstall
7481
{

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#---------------------------------#
22
# environment configuration #
33
#---------------------------------#
4-
version: 2.2.{build}.0
4+
version: 2.3.{build}.0
55
install:
66
- cinst -y pester
77
- git clone https://github.com/PowerShell/DscResource.Tests
@@ -34,12 +34,12 @@ test_script:
3434
#---------------------------------#
3535

3636
# scripts to run before deployment
37-
before_deploy:
37+
deploy_script:
3838
- ps: |
3939
# Creating project artifact
4040
$stagingDirectory = (Resolve-Path ..).Path
4141
$manifest = Join-Path $pwd "xWindowsUpdate.psd1"
42-
(Get-Content $manifest -Raw).Replace("2.2.0.0", $env:APPVEYOR_BUILD_VERSION) | Out-File $manifest
42+
(Get-Content $manifest -Raw).Replace("2.3.0.0", $env:APPVEYOR_BUILD_VERSION) | Out-File $manifest
4343
$zipFilePath = Join-Path $stagingDirectory "$(Split-Path $pwd -Leaf).zip"
4444
Add-Type -assemblyname System.IO.Compression.FileSystem
4545
[System.IO.Compression.ZipFile]::CreateFromDirectory($pwd, $zipFilePath)

xWindowsUpdate.psd1

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
# Version number of this module.
3-
ModuleVersion = '2.2.0.0'
3+
ModuleVersion = '2.3.0.0'
44

55
# ID used to uniquely identify this module
66
GUID = 'a9cba250-ea73-4d82-b31b-7e58cc50ffd1'
@@ -28,5 +28,29 @@ FunctionsToExport = '*'
2828

2929
# Cmdlets to export from this module
3030
CmdletsToExport = '*'
31+
32+
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
33+
PrivateData = @{
34+
35+
PSData = @{
36+
37+
# Tags applied to this module. These help with module discovery in online galleries.
38+
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource')
39+
40+
# A URL to the license for this module.
41+
LicenseUri = 'https://github.com/PowerShell/xWindowsUpdate/blob/master/LICENSE'
42+
43+
# A URL to the main website for this project.
44+
ProjectUri = 'https://github.com/PowerShell/xWindowsUpdate'
45+
46+
# A URL to an icon representing this module.
47+
# IconUri = ''
48+
49+
# ReleaseNotes of this module
50+
# ReleaseNotes = ''
51+
52+
} # End of PSData hashtable
53+
54+
} # End of PrivateData hashtable
3155
}
3256

0 commit comments

Comments
 (0)