Copy back to Source control


Hi


Is it possible to copy my output files after MSbuild action to the Source control?

Hi,

Unfortunately there is no way of pushing output files back into the source control automatically. Any output files that need to go back into source control will need to be pushed manually.


Hi,


Any work-around for this ? i need to preserve a copy of last successful build in my source control.

To copy back into your source you would need to do the following steps. Note that these steps are a very broad list of steps needed to complete what you are asking. Getting this setup and working will not be a trivial task.

1. Edit your repository and change your exclude rules so that all files that your newly created build/checkin does not trigger a new builds. If the excludes are not setup correctly then you will get infinite builds triggering when you check in your completed build

2. Add an extra stage to the end of the build that includes file copy actions that copy your build into your source control folder.

3. Add an Execute Program action or a Run DOS Command / Batch File Action that will checkin your new build. These actions are generic actions where you can specify another program or command that should execute. The commands / programs you need to run will depend on what Source Control system you are using and you will have to research which commands are needed to checkin your new build.



Hi,

Thx for this. It working fine with a Batch Script.

Im able to puch the published code back to source control.

But the Exclude pattern i'm using in the repository is not working , The trigger is firing again recursively.


I want to exclude the changeset of the folder "Latest"  because i'm saving the zip inside "Latest"

trunk/builds/Latest/LatestCodeZip.7z


Currently i'm suing this exclude patten:

/Build/Latest/**.*





Tried these patterns , but not working


/Builds/Latest/*.*


and 

/Builds/Latest/**.7z

I believe you need to use the full path:

/trunk/Builds/Latest/.

Also, adding binaries to your version control system like that is not really best practice, each time you do that, it will take longer to checkout. Although Continua will not trigger on those changes, it still sees them when we checkout the the latest change.

A better option is to create a file with the date/time as part of the name and copy it to a file server.