-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
65 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.vsix | ||
*.vsix | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
Copyright (c) Microsoft. All rights reserved. | ||
Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
*/ | ||
|
||
var path = require("path"), | ||
fs = require("fs"), | ||
Q = require ("q"), | ||
exec = Q.nfbind(require("child_process").exec); | ||
|
||
function installTasks() { | ||
var promise = Q(); | ||
var taskPath = path.join(process.cwd(), "code-push-vsts-task"); | ||
promise = promise.then(function() { | ||
console.log("Uploading task code-push-vsts-task"); | ||
process.chdir(taskPath); | ||
return npmInstall(); | ||
}) | ||
.then(tfxUpload); | ||
return promise; | ||
} | ||
|
||
function npmInstall() { | ||
console.log("Installing npm dependencies for task..."); | ||
return exec("npm install --only=prod").then(logExecReturn); | ||
} | ||
|
||
function tfxUpload() { | ||
console.log("Transferring...") | ||
return exec("tfx build tasks upload . --overwrite true").then(logExecReturn); | ||
} | ||
|
||
function logExecReturn(result) { | ||
console.log(result[0]); | ||
if (result[1] !== "") { | ||
console.error(result[1]); | ||
} | ||
} | ||
|
||
installTasks() | ||
.done(function() { | ||
console.log("Upload complete!"); | ||
}, function(input) { | ||
console.log("Upload failed!"); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "code-push-vsts-extension", | ||
"version": "1.0.0", | ||
"description": "A VSTS extension for releasing app updates to the CodePush service", | ||
"author": "Microsoft", | ||
"license": "MIT", | ||
"dependencies": { | ||
"q": "^1.4.1" | ||
} | ||
} |
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
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