0

有什么不对劲。我正在尝试通过下面的代码片段构建和部署,但碰巧当前构建没有被部署,而如果我给出的构建号比当前构建更旧,则会被部署。我很困惑出了什么问题...您能帮帮我吗...我不确定为什么不考虑当前的内部版本号...

<PropertyGroup>
            <deployappsvr>\\vdev\$(HostedFolder);\\vdev2\$(HostedFolder)</deployappsvr>
            <prjbin>Release\_PublishedWebsites\RE.Service</prjbin>
        </PropertyGroup>

    <Target Name ="AfterEndToEndIteration" Condition=" '$(IsDesktopBuild)'!='true' ">
        <!-- Starting deployment to servers -->
        <Message Text="Starting deployment to servers" />
        <CallTarget Targets="DeployBatching" />
        <Message Text="finished deploying to servers" />

        <!-- Unmap TFS mapping -->
        <Exec Command="tf workfold /unmap $(tfsmap) /workspace:$(WorkspaceName) /collection:http://tfsapp:8080/tfs"/>
      </Target>

      <ItemGroup>
        <SrcToCopy Include="$(DropLocation)\$(BuildNumber)\$(prjbin)\**\*"/>
        <DestToCopy Include="$(deployappsvr)"/>
      </ItemGroup>

      <Target Name="DeployBatching" Outputs="%(DestToCopy.FullPath)">

        <PropertyGroup>
          <DestToCopy>%(DestToCopy.FullPath)</DestToCopy>
        </PropertyGroup>

        <RemoveDir Directories="@(DestToCopy)"/>
        <MakeDir Directories="@(DestToCopy)"/>

        <Message Text="111 @(SrcToCopy) 222 $(prjbin) 333 "/>
        <Message Text="444  Copying source files @(SrcToCopy->'$(DestToCopy)\%(RecursiveDir)\%(Filename)%(Extension)') "/>
        <Copy
             SourceFiles="@(SrcToCopy)"
             DestinationFiles="@(SrcToCopy->'$(DestToCopy)\%(RecursiveDir)\%(Filename)%(Extension)')"/>
        <Message Text="Finished Copying source files"/>

        <Exec Command="powershell Invoke-Command -computername vdev -scriptblock {md c:\buildtestfolder} > c:\power\pwrcmd.log 2>&amp;1"/>
      </Target>
4

1 回答 1

0

我厌倦了从构建服务器部署,即从服务器副本而不是 dropzone 部署构建工件,这似乎正在工作,但从 dropzone 部署似乎仍然无法正常工作。

于 2014-08-28T22:10:22.363 回答