Skip to content

Commit 8ee71d2

Browse files
authored
Merge pull request #7 from mcasimir/release/1.0.1
Release/1.0.1
2 parents 9634a4e + 8054bbe commit 8ee71d2

File tree

6 files changed

+54
-23
lines changed

6 files changed

+54
-23
lines changed

.travis.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
language: node_js
22
node_js:
3-
- "6"
3+
- '6'
44
install:
5-
- npm install
6-
- npm install -g codecov
5+
- npm install
6+
- npm install -g codecov
77
script:
8-
- npm run test:ci
9-
- codecov
8+
- npm run test:ci
9+
- codecov
10+
deploy:
11+
provider: npm
12+
13+
api_key:
14+
secure: mOKBUKhquWm42nYbXf3pr144KyG2KVqW0ldWXblVPm5U8ZIPCqMhmRUJD3M/fyeLVMoUoOlVXu1AhxTyFIi5y4TjH29joAC0ZnppI/vr+Ki4zcgHOzPuUHgthsxL8Ov40sJUPEg1oId7XXH5Dj5Y3+zNr4SqyN04F96NqLN+dVcHhDHrxdag0swdXyAIFloGXFJFGOABOH+MBq5InujyVfQ56a6iT8lAZDkzr6GkFGMuao4pavVny4bVehacIHrByYJq+To6zxn6/afqtWUNt6hpPqn02nvJcFSdamC69GNmwVGBDGe1ZYvBN2r3nYwIb+wJr0iBD0hCRQxdiXKpLjGdYUm9LMbz3ZWLYYOw49xZEsiQDAgumTSN4CwlyE1Ba3kgZhaqOilYEdqbUqWthOVDRCiLicza/MrnMhd0GYPUb+/fVrpfdYkCL3f11/APpYf03GKPXcHpVZmk+nKCM2XFMGmoePg6DYG7OqMKl5znie4n4MfvuEM1fsjJzj85xEceaWjNdQkee6VbkSoW+A3EFNS+tT1Be6VXaX8i8WwD7BiFg+s89rj0k4GX1gpTcu1SNJTI8KbL60ZPa8Gb+5CS8KFufVvXBy46vadWqwJ4/tfuA519GniNcQkMSfoL6q6BMwDJycTdITi9KmFkW2QU0XGUUZoHLqWZO7rxQDA=
15+
on:
16+
tags: true
17+
repo: mcasimir/release-flow

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<a name="v1.0.1"></a>
2+
# [v1.0.1](https://github.com/mcasimir/release-flow/compare/v1.0.0..v1.0.1)
3+
14
<a name="v1.0.0"></a>
25
# [v1.0.0](https://github.com/mcasimir/release-flow/commits/v1.0.0)
36

@@ -8,4 +11,4 @@
811
- added cli ([24582bc](https://github.com/mcasimir/release-flow/commits/24582bc))
912
- squash commits with same message in changelog ([1aac643](https://github.com/mcasimir/release-flow/commits/1aac643))
1013
- generate changelog ([4ed812c](https://github.com/mcasimir/release-flow/commits/4ed812c))
11-
- guess release number ([065766c](https://github.com/mcasimir/release-flow/commits/065766c))
14+
- guess release number ([065766c](https://github.com/mcasimir/release-flow/commits/065766c))

lib/plugins/generate-changelog/changelog-template.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports.default = function (context) {
1616
lines.push('');
1717
}
1818

19-
var titleBullet = (entry.isLeaf() ? '-' : Array(level + 1).join('#')) + ' ';
19+
var titleBullet = (entry.isLeaf() && level !== 1 ? '-' : Array(level + 1).join('#')) + ' ';
2020

2121
var subject = entry.subject;
2222
var scope = entry.scope || '';
@@ -47,5 +47,5 @@ exports.default = function (context) {
4747
level--;
4848
});
4949

50-
return lines.join('\n');
50+
return lines.join('\n') + '\n\n';
5151
};

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "release-flow",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Git flow conventional releases",
55
"main": "dist/Release.js",
66
"scripts": {
@@ -13,7 +13,9 @@
1313
"cli": "npm run build && node ./lib/cli.js"
1414
},
1515
"pre-commit": {
16-
"run": ["build"]
16+
"run": [
17+
"build"
18+
]
1719
},
1820
"bin": {
1921
"release-flow": "./lib/cli.js"
@@ -59,4 +61,4 @@
5961
"pre-commit": "1.1.3",
6062
"sinon": "1.17.5"
6163
}
62-
}
64+
}

src/plugins/generate-changelog/changelog-template.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function(context) {
1212
}
1313

1414
let titleBullet = (
15-
entry.isLeaf() ?
15+
entry.isLeaf() && level !== 1 ?
1616
'-' :
1717
Array(level + 1).join('#')
1818
) + ' ';
@@ -47,5 +47,5 @@ export default function(context) {
4747
level--;
4848
});
4949

50-
return lines.join('\n');
50+
return lines.join('\n') + '\n\n';
5151
}

test/plugins/changelog-template.spec.js

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ describe('changelog-template', function() {
1818

1919
let changelog = changelogTemplate(context);
2020

21-
equal(changelog, '<a name="release1"></a>');
21+
equal(changelog, `<a name="release1"></a>
22+
23+
`);
2224
});
2325

24-
it('Adds bullet list entry for each top level leaf', function() {
26+
it('Adds h1 entry for each top level leaf', function() {
2527
let root = new ChangelogEntry('root');
2628

2729
let context = {
@@ -35,7 +37,9 @@ describe('changelog-template', function() {
3537

3638
equal(changelog,
3739
`<a name="release1"></a>
38-
- root`);
40+
# root
41+
42+
`);
3943
});
4044

4145
it('Render subject for non leaf entries as title', function() {
@@ -55,7 +59,9 @@ describe('changelog-template', function() {
5559
`<a name="release1"></a>
5660
# root
5761
58-
- child1`);
62+
- child1
63+
64+
`);
5965
});
6066

6167
it('Adds a space before >2nd level titles', function() {
@@ -80,7 +86,9 @@ describe('changelog-template', function() {
8086
8187
## child1
8288
83-
- child2`);
89+
- child2
90+
91+
`);
8492
});
8593

8694
it('Does not add a space after leaf entries', function() {
@@ -108,7 +116,9 @@ describe('changelog-template', function() {
108116
## child1
109117
110118
- child2
111-
- child3`);
119+
- child3
120+
121+
`);
112122
});
113123

114124
it('renders one link', function() {
@@ -126,7 +136,9 @@ describe('changelog-template', function() {
126136

127137
equal(changelog,
128138
`<a name="release1"></a>
129-
- root ([link 1](link-1-url))`);
139+
# root ([link 1](link-1-url))
140+
141+
`);
130142
});
131143

132144
it('renders two or more link comma separated', function() {
@@ -145,7 +157,9 @@ describe('changelog-template', function() {
145157

146158
equal(changelog,
147159
`<a name="release1"></a>
148-
- root ([link 1](link-1-url), [link 2](link-2-url))`);
160+
# root ([link 1](link-1-url), [link 2](link-2-url))
161+
162+
`);
149163
});
150164

151165
it('renders scope in bold', function() {
@@ -163,7 +177,9 @@ describe('changelog-template', function() {
163177

164178
equal(changelog,
165179
`<a name="release1"></a>
166-
- **feat** - root`);
180+
# **feat** - root
181+
182+
`);
167183
});
168184

169185
it('renders subject link', function() {
@@ -181,6 +197,8 @@ describe('changelog-template', function() {
181197

182198
equal(changelog,
183199
`<a name="release1"></a>
184-
- [root](xyz)`);
200+
# [root](xyz)
201+
202+
`);
185203
});
186204
});

0 commit comments

Comments
 (0)