|
@@ -15,17 +15,12 @@ function execSyncSilently(cmd) {
|
15
|
15
|
}
|
16
|
16
|
|
17
|
17
|
function validateEnv() {
|
18
|
|
- if (!process.env.CI || !process.env.TRAVIS) {
|
19
|
|
- throw new Error(`releasing is only available from Travis CI`);
|
|
18
|
+ if (!process.env.CI) {
|
|
19
|
+ throw new Error(`releasing is only available from CI`);
|
20
|
20
|
}
|
21
|
21
|
|
22
|
|
- if (process.env.TRAVIS_BRANCH !== 'master') {
|
23
|
|
- console.error(`not publishing on branch ${process.env.TRAVIS_BRANCH}`);
|
24
|
|
- return false;
|
25
|
|
- }
|
26
|
|
-
|
27
|
|
- if (process.env.TRAVIS_PULL_REQUEST !== 'false') {
|
28
|
|
- console.error(`not publishing as triggered by pull request ${process.env.TRAVIS_PULL_REQUEST}`);
|
|
22
|
+ if (!process.env.JENKINS_MASTER) {
|
|
23
|
+ console.log(`not publishing on a different build`);
|
29
|
24
|
return false;
|
30
|
25
|
}
|
31
|
26
|
|