Skip to content

Commit 80f384a

Browse files
author
Hans Kristian Flaatten
committed
chore(package): add semantic release Wercker CI configuration
1 parent c78530f commit 80f384a

File tree

2 files changed

+43
-26
lines changed

2 files changed

+43
-26
lines changed

package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "turbasen",
3-
"version": "1.1.1",
3+
"version": null,
44
"description": "Node.JS-client for Nasjonal Turbase",
55
"main": "index.js",
66
"scripts": {
77
"lint": "eslint index.js test.js",
8-
"test": "mocha -R tap test.js",
9-
"watch": "mocha -w -R progress test.js"
8+
"test": "mocha -c --check-leaks -R tap test.js",
9+
"watch": "mocha -w -b -c --check-leaks -R progress test.js",
10+
"semantic-release": "semantic-release"
1011
},
1112
"repository": {
1213
"type": "git",
@@ -29,7 +30,8 @@
2930
"devDependencies": {
3031
"eslint": "^1.10.3",
3132
"eslint-config-airbnb": "^3.1.0",
32-
"mocha": "^2.3.4"
33+
"mocha": "^2.3.4",
34+
"semantic-release": "^4.3.5"
3335
},
3436
"dependencies": {
3537
"each-async": "^1.1.1",

wercker.yml

+37-22
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,45 @@
11
box: node:argon
2-
build:
3-
steps:
4-
- script:
5-
name: echo nodejs information
6-
code: |
7-
echo "node version $(node -v) running"
8-
echo "npm version $(npm -v) running"
92

10-
- script:
11-
name: echo imagemagick information
12-
code: |
13-
convert --version
3+
build:
4+
steps:
5+
- script:
6+
name: echo nodejs information
7+
code: |
8+
echo "node version $(node -v) running"
9+
echo "npm version $(npm -v) running"
1410
15-
- npm-install
11+
- npm-install
1612

17-
- script:
18-
name: lint
19-
code: |
20-
npm run lint
13+
- script:
14+
name: lint
15+
code: npm run lint
2116

22-
- npm-test
17+
- npm-test
2318

24-
after-steps:
25-
- turistforeningen/slack-notifier:
26-
url: $SLACK_WEBHOOK_URL
19+
after-steps:
20+
- turistforeningen/slack-notifier:
21+
url: $SLACK_WEBHOOK_URL
2722

2823
deploy:
29-
steps:
30-
- turistforeningen/npm-publish
24+
steps:
25+
# Reinstall node_modules to fix broken symlinks
26+
# https://github.com/wercker/docs/issues/310
27+
- script:
28+
name: rm node_modules
29+
code: rm -rf node_modules
30+
31+
- npm-install
32+
33+
- script:
34+
name: semantic release pre
35+
code: npm run semantic-release -- pre
36+
37+
- turistforeningen/npm-publish
38+
39+
- script:
40+
name: semantic release post
41+
code: npm run semantic-release -- post
42+
43+
after-steps:
44+
- turistforeningen/slack-notifier:
45+
url: $SLACK_WEBHOOK_URL

0 commit comments

Comments
 (0)