mrjackdavis / grunt-msdeploy

GNU General Public License v2.0
3 stars 6 forks source link

Space in dest iisApp #8

Open vincent-boulin opened 9 years ago

vincent-boulin commented 9 years ago

Hello,

I am trying to use your plugin to deploy some applications on the "Default Web Site" iis site. This is my configured task for doing this :

msdeploy: {
    push: {
        options: {
            verb: 'sync',
            source: {
                iisApp: '<%= dirs.dist.root %>/'
            },
            dest: {
                iisApp: "Default Web Site/haha"
            }
        }
    }
}

This configuration give me an error like :

Argument '"-dest:iisApp=Default Web Site/haha"' not recognized. All arguments must begin with "-" char

I'm trying to escape the argument but this doesn't work.

I don't know if it's a bug or if i do something wrong.

Thanks in advance.

skvettn commented 8 years ago

I have the same bug when using Error: Unrecognized argument '"-verb:sync -allowUntrusted:true -source:contentPath=\"C:\Development\Git'. All arguments must begin with "-". My arguments is: -source:contentPath="C:\Development\Git Sources\

the bug comes when calling: var process = spawn(command,args); in msdeploy.js

Giovanni-Mattucci commented 8 years ago

I'm having the same issue.

RobinHerbots commented 4 years ago

@sk4ry , @skvettn , @Giovanni-Mattucci ,

I had the same issue, but it seems this is more an msdeploy issue then it is due to the grunt-msdeploy plugin. I solved it by using a declareParam and a parameters.xml file.

Gruntfile.js

  msdeploy: {
      pack: {
        options: {
          verb: "sync",
          source: {
            contentPath: path.resolve("dist")
          },
          dest: {
            package: path.resolve(dir) + path.sep + "package.zip"
          },
          declareParam: {
            name: "contentPathDest",
            description: "ContentPath_for_destination",
            tags: "contentPath",
            kind: "ProviderPath",
            scope: "contentPath",
            match: escapeRegex(path.resolve("dist"))
          }
        }
      },
      push: {
        options: {
          verb: "sync",
          allowUntrusted: "true",
          enableRule: "DoNotDeleteRule",
          source: {
            package: path.resolve(dir) + path.sep + "package.zip"
          },
          dest: {
            auto: "",
            computerName: "computerName",
            includeAcls: false,
            userName: "userName",
            password: "password"
          },
          setParamFile: "package.SetParameters.xml"
        }
      }
    },

package.SetParameters.xml

<parameters>
    <setParameter name="contentPathDest" value="Default Web Site/WebsiteName" />
</parameters>