Elamurugan
Elamurugan

Reputation: 3204

TFS with Git Build process

Currently my office moving towards TFS and we are setting local TFS based git for every PHP projects we have/do.

Project setup in TFS with team using git branch/commit works as expected and we want to do the auto-publishing of one branch updates to ftp folder, that also works,

But every time it copies the entire list of files from TFS git code folder to remote server and i couldn't able to set it up correctly.

My Copying process is like this in TFS 2017.

enter image description here

How can i set tfs build process so only changes from commits can be copied to remote server with tfs

Upvotes: 0

Views: 171

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30362

Basically TFS always delivered all files (including changed and unchanged).

For an incremental build (Set Clean to False when get sources in your case), it will sync the source and only get the changed files from the second time to build.

So, if you want to deliver the only changed files to a specific location, you can add a Copy Files step to copy the changed files to the location. That means you need to modify the build definition every time, obviously it's not applied to CI (Continuous Integration).

As a workaround you can write a script to delete the unchanged files from the staging folder before uploading to FTP location.

Reference below similar threads:

Upvotes: 1

Related Questions