VSMobileCenterBuildRequest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Construct build definition Url | |
var buildDefinitionUrl = `${mobileCenterBaseUrl}/branches/master/builds`; | |
var options = { | |
url: buildDefinitionUrl, | |
method: 'POST', | |
headers: { | |
"X-API-Token": apiToken, | |
"Accept": "application/json", | |
"Content-Type": "application/json" | |
} | |
}; | |
request(options) | |
.then(function (body) { | |
// Parse the response so we can get the id of the new version | |
var buildDefinitionResponse = JSON.parse(body); | |
var buildId = buildDefinitionResponse.id; | |
return buildId; | |
}) | |
.then(function (buildId) { | |
util.debug("Starting build for Build Id: {0}", buildId); | |
return waitForCompletion(buildId); | |
}) | |
.then(function (buildId) { | |
util.debug("Build is complete. Retrieving built output..."); | |
return downloadOutput(buildId); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment