Skip to content

Commit

Permalink
Update the condition for checking successful uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
rnowosielski committed Dec 6, 2019
1 parent 01d1028 commit 9a7cba9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 19 deletions.
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# Azure Dev Ops extension: Phrase Build tasks

# Manual build steps

cd phraseUploadResource/
npm install --production
npm run build
cd ..
cd phraseDownloadResource/
npm install --production
npm run build
cd ..
tfx extension create --manifest-globs vss-extension.json

Soon to be automated.

# Attribution
### Attribution

Icons come from https://freeicons.io/
2 changes: 1 addition & 1 deletion phraseDownloadResource/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Rafał Nowosielski <[email protected]>",
"version": {
"Major": 0,
"Minor": 10,
"Minor": 11,
"Patch": 0
},
"instanceNameFormat": "Download file $(resourceFileName)",
Expand Down
2 changes: 1 addition & 1 deletion phraseUploadResource/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async function run() {
let req: request.Request = request.post(options, function (err, resp, body) {
if (err) {
tl.setResult(tl.TaskResult.Failed, err.message);
} else if (resp && resp.statusCode == HttpStatus.OK) {
} else if (resp && (resp.statusCode == HttpStatus.OK || resp.statusCode == HttpStatus.CREATED || resp.statusCode == HttpStatus.ACCEPTED)) {
console.log(`Uploaded file ${resourceFileName}`)
} else {
tl.setResult(tl.TaskResult.Failed, "Unknown error occured");
Expand Down
2 changes: 1 addition & 1 deletion phraseUploadResource/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Rafał Nowosielski <[email protected]>",
"version": {
"Major": 0,
"Minor": 10,
"Minor": 11,
"Patch": 0
},
"instanceNameFormat": "Upload file $(resourceFileName)",
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "phrase-build-tasks",
"name": "Translations from phrase.com",
"description": "Extension provides tasks that make it easy to integrate with phrase.com, by making import and export of translation resources part of your build pipeline.",
"version": "0.0.10",
"version": "0.0.11",
"publisher": "AdiaTechnology",
"targets": [
{
Expand Down

0 comments on commit 9a7cba9

Please sign in to comment.