Skip to content

Commit 895e0bf

Browse files
author
Vasil Chimev
authored
Update Travis CI Scripts (#2915)
Fix publish to S3
1 parent e50a7fc commit 895e0bf

File tree

2 files changed

+33
-37
lines changed

2 files changed

+33
-37
lines changed

.travis.yml

+26-26
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ before_script:
1616
- npm install grunt
1717
- node_modules/.bin/grunt enableScripts:false
1818
- grunt rebuild
19-
- ./bin/nativescript error-reporting disable # force ~/.local dir creation -- some tests rely on it
20-
- ./bin/nativescript usage-reporting disable
19+
- "./bin/nativescript error-reporting disable"
20+
- "./bin/nativescript usage-reporting disable"
2121
- npm test
2222
- node_modules/.bin/grunt enableScripts:true
2323
script:
@@ -30,27 +30,27 @@ after_success:
3030
before_deploy:
3131
- node .travis/add-publishConfig.js $TRAVIS_BRANCH
3232
deploy:
33-
- provider: s3
34-
bucket: nativescript-ci
35-
access_key_id: AKIAIYSWYOZRFLVKPCTQ
36-
secret_access_key:
37-
secure: THGlblH9XdRcTQMc3jm4kpwCB3myl8MGB3v9XjB5ObK4gqxUxuPi6e158LEG9Dgb730MGEYtaAjc9OneH59WAjQOrdcf3GXiGKOiCYzGYZLqVE4pjNDuxHaVGOj7mso4TzMinMCaDSQajTvadCfVmXqgT6p9eSXkiV3V2d2DN6c=
38-
skip_cleanup: true
39-
local-dir: s3-publish
40-
upload-dir: build_result
41-
on:
42-
branch: master
43-
- provider: npm
44-
skip_cleanup: true
45-
46-
on:
47-
branch: master
48-
api_key:
49-
secure: KzzsvF3eA3j4gRQa8tO//+XWNSR3XiX8Sa18o3PyKyG9/cBZ6PQ3Te74cNS1C3ZiLUOgs5dWA6/TmRVPci4XjvFaWo/B6e2fuVSl5H94Od99bkeBHJsbLSEkLN4ClV/YbGuyKgA5Q2yIFt6p2EJjL90RjbbIk7I4YuyG2Mo3j0Q=
50-
- provider: npm
51-
skip_cleanup: true
52-
53-
on:
54-
branch: release
55-
api_key:
56-
secure: KzzsvF3eA3j4gRQa8tO//+XWNSR3XiX8Sa18o3PyKyG9/cBZ6PQ3Te74cNS1C3ZiLUOgs5dWA6/TmRVPci4XjvFaWo/B6e2fuVSl5H94Od99bkeBHJsbLSEkLN4ClV/YbGuyKgA5Q2yIFt6p2EJjL90RjbbIk7I4YuyG2Mo3j0Q=
33+
- provider: s3
34+
access_key_id: AKIAJL6X6724CSX64X3Q
35+
secret_access_key:
36+
secure: a0T/2S+/rkRJqEotWPAr1VELA3k5TGyRw6VmXgBQnkirc6H0Pfu0P2DY8iriO7pnTPDCPAskdBCuk6t+RYw/OCrGDzFPApnAQ7t3tksKPr2bGYqh2HVqbFKZyEbNjzwsgxn7cmLPo936ZTHP2muQItEI3o9Zh9EZ5XHtv0Maw0k=
37+
bucket: nativescript-ci
38+
skip_cleanup: true
39+
local-dir: s3-publish
40+
upload-dir: build_result
41+
on:
42+
branch: master
43+
- provider: npm
44+
skip_cleanup: true
45+
46+
on:
47+
branch: master
48+
api_key:
49+
secure: KzzsvF3eA3j4gRQa8tO//+XWNSR3XiX8Sa18o3PyKyG9/cBZ6PQ3Te74cNS1C3ZiLUOgs5dWA6/TmRVPci4XjvFaWo/B6e2fuVSl5H94Od99bkeBHJsbLSEkLN4ClV/YbGuyKgA5Q2yIFt6p2EJjL90RjbbIk7I4YuyG2Mo3j0Q=
50+
- provider: npm
51+
skip_cleanup: true
52+
53+
on:
54+
branch: release
55+
api_key:
56+
secure: KzzsvF3eA3j4gRQa8tO//+XWNSR3XiX8Sa18o3PyKyG9/cBZ6PQ3Te74cNS1C3ZiLUOgs5dWA6/TmRVPci4XjvFaWo/B6e2fuVSl5H94Od99bkeBHJsbLSEkLN4ClV/YbGuyKgA5Q2yIFt6p2EJjL90RjbbIk7I4YuyG2Mo3j0Q=

.travis/add-publishConfig.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
#!/usr/bin/env node
22

3-
var fsModule = require("fs");
3+
const fsModule = require("fs");
4+
const path = "./package.json";
5+
const fileOptions = {encoding: "utf-8"};
6+
const content = fsModule.readFileSync(path, fileOptions);
47

5-
// Adds a publishConfig section to the package.json file
6-
// and sets a tag to it
7-
8-
var path = "./package.json";
9-
var fileOptions = {encoding: "utf-8"};
10-
var content = fsModule.readFileSync(path, fileOptions);
11-
12-
var packageDef = JSON.parse(content);
8+
const packageDef = JSON.parse(content);
139
if (!packageDef.publishConfig) {
1410
packageDef.publishConfig = {};
1511
}
1612

17-
var branch = process.argv[2];
13+
const branch = process.argv[2];
1814
if (!branch) {
1915
console.log("Please pass the branch name as an argument!");
2016
process.exit(1);
2117
}
2218
packageDef.publishConfig.tag = branch === "release" ? "rc" : "next";
2319

24-
var newContent = JSON.stringify(packageDef, null, " ");
20+
const newContent = JSON.stringify(packageDef, null, " ");
2521
fsModule.writeFileSync(path, newContent, fileOptions);

0 commit comments

Comments
 (0)