Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test-Resource does not correctly see differences when files were updated #21

Open
wmeints opened this issue Nov 23, 2017 · 1 comment
Open
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@wmeints
Copy link

wmeints commented Nov 23, 2017

After using the xWebDeploy resource twice I discovered that it only sees files that were added or deleted. Updated files are not detected. And because of that the webdeploy command to sync the package with the target folder/IIS site is not executed.

I think this is because of this code from xWebPackageDeploy.psm1:

if($Ensure -eq "Present")
{
    #find all the files for a given site
    $siteFiles = & $appCmd -verb:dump "-source:contentPath=$Destination"
    # the packages exported using webdeploy tool, contain 2 extra entries with site name. Skipping those..
    #compare based on the number of files
    if(($packageFiles.Count -eq $siteFiles.Count) -or (($packageFiles.Count -2) -eq $siteFiles.Count) )
    {
        $result = $true
    }
}   

I would expect something like:

msdeploy -verb:sync -source:package="..." -dest:contentPath="..." -whatif

The problem is however that this command doesn't return a very usable result for powershell to process.

If anyone knows a better way to deal with updated files, I'm all ears!

@wmeints
Copy link
Author

wmeints commented Nov 28, 2017

I fixed the problem myself by writing a regex pattern to parse the output of msdeploy.exe

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants