-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changelog generation #41
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,9 +127,12 @@ $ gulp build | |
2. Run tests | ||
3. Build everything | ||
4. Bump the version in `package.json` | ||
5. Commit the version change | ||
6. Create a git tag | ||
7. Run `git push` to `upstream/master` | ||
5. Generate a changelog based on the git log | ||
6. Commit the version change & `CHANGELOG.md` | ||
7. Create a git tag | ||
8. Run `git push` to `upstream/master` | ||
9. Publish a release to Github releases (if `GH_TOKEN` is available) | ||
10. Publish to npm | ||
|
||
```bash | ||
# Major release | ||
|
@@ -151,6 +154,15 @@ $ aegir-release --env node | |
$ gulp release --env node | ||
``` | ||
|
||
You can generate a changelog for all versions by using `--first` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not preview, this is the first time the changelog is generated. |
||
|
||
```bash | ||
$ aegir-relase --first | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/relase/release |
||
``` | ||
|
||
You can skip all changelog generation and the github release by passing | ||
in `--no-changelog`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
||
## Other Notes | ||
|
||
There is a badge. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
"babel-preset-es2015": "^6.9.0", | ||
"brfs": "^1.4.3", | ||
"chalk": "^1.1.3", | ||
"conventional-github-releaser": "^1.1.3", | ||
"coveralls": "^2.11.12", | ||
"eslint": "^3.2.0", | ||
"eslint-config-standard": "^5.3.5", | ||
|
@@ -39,6 +40,7 @@ | |
"gulp": "^3.9.1", | ||
"gulp-babel": "^6.1.2", | ||
"gulp-bump": "^2.2.0", | ||
"gulp-conventional-changelog": "^1.1.0", | ||
"gulp-eslint": "^3.0.1", | ||
"gulp-filter": "^4.0.0", | ||
"gulp-git": "^1.10.0", | ||
|
@@ -89,4 +91,4 @@ | |
"dignifiedquire <[email protected]>", | ||
"greenkeeperio-bot <[email protected]>" | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict' | ||
|
||
const $ = require('gulp-load-plugins')() | ||
|
||
module.exports = (gulp, done) => { | ||
if ($.util.env.changelog === false) { | ||
$.util.log('Skipping changelog generation') | ||
return done() | ||
} | ||
|
||
const releaseCount = $.util.env.first ? 0 : 1 | ||
|
||
return gulp.src('CHANGELOG.md') | ||
.pipe($.conventionalChangelog({ | ||
preset: 'angular', | ||
releaseCount | ||
})) | ||
.pipe(gulp.dest('./')) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict' | ||
|
||
const $ = require('gulp-load-plugins')() | ||
|
||
const getVersion = require('../../src/utils').getVersion | ||
|
||
module.exports = (gulp, done) => { | ||
const newVersion = getVersion() | ||
|
||
return gulp.src(['package.json', 'CHANGELOG.md']) | ||
.pipe($.git.add()) | ||
.pipe($.git.commit(`chore: release version v${newVersion}`, {args: '-n'})) | ||
.pipe($.filter('package.json')) | ||
.pipe($.tagVersion()) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict' | ||
|
||
const $ = require('gulp-load-plugins')() | ||
const conventionalGithubReleaser = require('conventional-github-releaser') | ||
|
||
module.exports = (gulp, done) => { | ||
if ($.util.env.changelog === false) { | ||
$.util.log('Skipping github release') | ||
return done() | ||
} | ||
|
||
const token = process.env.GH_TOKEN || $.util.env.token | ||
|
||
if (!token) { | ||
$.util.log($.util.colors.yellow(` | ||
Skipping Github release as you are missing an oauth token. | ||
You can supply one by either using $GH_TOKEN or --token. | ||
`)) | ||
return done() | ||
} | ||
|
||
conventionalGithubReleaser({ | ||
type: 'oauth', | ||
token | ||
}, { | ||
preset: 'angular' | ||
}, done) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is not, will it fail silently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it will tell you with a log message