Skip to content

Commit 7cedd0b

Browse files
committed
fix: remove the travis_after_all setup from travis.yml
BREAKING CHANGE: With versions >= 6 of semantic-release travis_after_all is no longer needed, and so no longer added to the .travis.yml. As semantic-release 6 is now moving to the "latest" dist-tag this functionality got removed.
1 parent 6dbd4b4 commit 7cedd0b

File tree

3 files changed

+10
-34
lines changed

3 files changed

+10
-34
lines changed

.travis.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@ cache:
55
notifications:
66
email: false
77
node_js:
8-
- '4'
9-
- '6'
108
- '7'
11-
before_install:
12-
- npm update -g npm
9+
- '6'
10+
- '4'
1311
before_script:
1412
- npm prune
1513
after_success:
16-
- 'curl -Lo travis_after_all.py https://git.io/vXXtr'
17-
- python travis_after_all.py
18-
- export $(cat .to_export_back) &> /dev/null
1914
- npm run semantic-release
2015
branches:
2116
except:
22-
- /^v\d+\.\d+\.\d+$/
17+
- "/^v\\d+\\.\\d+\\.\\d+$/"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "semantic-release-cli",
3+
"version": "0.0.0-development",
34
"description": "setup automated semver compliant package publishing",
45
"author": "Christoph Witzko <npm@christophwitzko.com> (http://christophwitzko.com)",
56
"babel": {

src/lib/travis.js

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const travisyml = {
1717
notifications: {
1818
email: false
1919
},
20-
node_js: ['6'],
20+
node_js: ['7', '6', '4'],
2121
before_script: ['npm prune'],
2222
after_success: ['npm run semantic-release'],
2323
branches: {
@@ -26,20 +26,6 @@ const travisyml = {
2626
}
2727
}
2828

29-
const travisymlMulti = _.assign({}, travisyml, {
30-
node_js: [
31-
'4',
32-
'6',
33-
'7'
34-
],
35-
after_success: [
36-
'curl -Lo travis_after_all.py https://git.io/vXXtr',
37-
'python travis_after_all.py',
38-
'export $(cat .to_export_back) &> /dev/null',
39-
'npm run semantic-release'
40-
]
41-
})
42-
4329
async function isSyncing (travis) {
4430
try {
4531
var res = await promisify(travis.users.get.bind(travis))()
@@ -73,20 +59,14 @@ async function setEnvVar (travis, name, value) {
7359
}
7460

7561
async function createTravisYml (info) {
76-
const choices = [
77-
'Single Node.js version.',
78-
'Multiple Node.js versions.',
79-
'Create no `.travis.yml`'
80-
]
8162
const answers = await inquirer.prompt([{
82-
type: 'list',
63+
type: 'confirm',
8364
name: 'yml',
84-
message: 'What kind of `.travis.yml` do you want?',
85-
choices
65+
message: 'Do you want a `.travis.yml` file with semantic-release setup?',
66+
default: true
8667
}])
87-
const ans = choices.indexOf(answers.yml)
88-
if (ans === 2) return
89-
const tyml = yaml.safeDump(ans === 0 ? travisyml : travisymlMulti)
68+
if (!answers.yml) return
69+
const tyml = yaml.safeDump(travisyml)
9070
try {
9171
accessSync('.travis.yml')
9272
const {ok} = await inquirer.prompt([{

0 commit comments

Comments
 (0)