Copy one file in target directory on deploy from visual studio team services

后端 未结 7 2336
天命终不由人
天命终不由人 2020-11-28 08:46

I\'m using VSTS as a build server, and while building I want to copy the bin folder contents to the root of the target, and also custom files from another folder to this tar

7条回答
  •  一向
    一向 (楼主)
    2020-11-28 09:35

    You need to specify the copy root if you want to copy files only without folder structure. Since the project.exe is in a different path with script.ps1 file, you need to copy them in different copy task.

    Following the steps below:

    1. Add a "Copy Files" step to copy "project.exe". Settings like following:
    2. Add a "Copy Files" step to copy "SomeScripts" folder. Settings like following:
    3. Add a "Copy and Publish Build Artifacts" step to copy these files to "drop". Settings like following:

    Now you should get the things like following in drop folder:

    Project.exe
    SomeScripts
        script.ps1
    

提交回复
热议问题