As described in my previous question:
Asp.net web API 2 separation Of Web client and web server development
In order to get full separation of client and server, I want to set a variable to hold the end point for client requests. When client side is developed, the requests will be sent to a "stub server" that returns default values so that client side can be developed without depending on the server side development. That stub server runs on one port different that the real server port, and when running integration between server and client, in a branch integration, the variable will hold the real server port.
For that matter, I learned that a build tool such as Gulp could help me.
I'm working with Tfs source control.
What I want is for example, write a task that will function like this:
gulp.task('setEndPoint', function() {
var branchName = // How do I get it?
if (branchName == "Project.Testing")
endPoint = "localhost/2234"
if (branchName == "Project.Production")
endPoint = "localhost/2235"
});
Is there a way to get the current branch that task is running in?
Thanks for helpers