Skip to content
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

chore: update CHANGELOG automation to use conventional-changelog #3669

Merged
merged 3 commits into from
Oct 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
CHANGELOG
=========

## HEAD (Unreleased)
_(none)_

--------------------

## 5.12.2 (2016-09-28)
* Changes from 5.11.7 on the 5.12 branch

Expand Down
3 changes: 2 additions & 1 deletion build/grunt.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {gruntCustomizer, gruntOptionsMaker} from './options-customizer.js';
import chg from 'chg';
import nodeCli from 'shelljs-nodecli';

module.exports = function(grunt) {
require('time-grunt')(grunt);
Expand Down Expand Up @@ -31,7 +32,7 @@ module.exports = function(grunt) {
release: {
tag_name: 'v'+ version.full,
name: version.full,
body: chg.find(version.full).changesRaw
body: nodeCli.exec('conventional-changelog', '-p videojs', {silent: true}).output
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure its worth using shelljs-nodecli for this, shouldn't we just use shelljs and point to path.join(__dirname, '..', 'node_modules', '.bin', 'conventional-changelog'). My reasoning here is that shelljs-nodecli is not very heavily used, spin off modules are usually not kept up to date with the parent, and I don't even see a git repo for it on npm.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a valid concern. The repo is available here, I think it's just missing from the package.json. Also, nicholas has a good track record of maintaining modules or giving it away to other maintainers to help out (see eslint as an example). In addition, I think at this point shelljs-nodecli is feature complete and there isn't much necessary to do with it; for example, it hasn't been updated in 3 years but still works great.
In addition, it will instead encapsulate the whole thing of running a node binary easily, so, we don't have to worry about how to run it properly or get to the binary, we only need to think about how to use conventional-changelog.
Hopefully, this addresses your concerns.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that works then

},
},
files: {
Expand Down
4 changes: 2 additions & 2 deletions contrib.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
[ "git checkout -b temp-release-branch master","Create a temporary branch for the dist" ],
[ "grunt version:{{release_type}}", "Bump package versions" ],
[ "./build/bin/version", "Return the current VJS Version from the package.json file", "version" ],
[ "grunt chg-release:{{version}}", "Update the changelog with the new release" ],
[ "npm run changelog", "Update the changelog with the new release" ],
[ "git commit -am 'v{{version}}'", "Add and commit the package changes" ],
[ "git checkout master", "Checkout the developmet branch" ],
[ "git merge temp-release-branch", "Merge package changes into the dev brach" ],
Expand All @@ -306,7 +306,7 @@
[ "grunt test", "Run tests" ],
[ "grunt version:{{release_type}}", "Bump package versions" ],
[ "./build/bin/version", "Return the current VJS Version from the package.json file", "version" ],
[ "grunt chg-release:{{version}}", "Update the changelog with the new release" ],
[ "npm run changelog", "Update the changelog with the new release" ],
[ "git commit -am 'v{{version}}'", "Add and commit the package changes" ],
[ "git push upstream stable", "Push the release branch changes to the repo" ],
[ "git checkout -b temp-release-branch stable","Create a temporary branch for the dist" ],
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"homepage": "http://videojs.com",
"author": "Steve Heffernan",
"scripts": {
"changelog": "conventional-changelog -p videojs -i CHANGELOG.md -s",
"build": "grunt dist",
"change": "grunt chg-add",
"clean": "grunt clean",
Expand Down Expand Up @@ -55,13 +56,15 @@
"browserify-versionify": "^1.0.4",
"bundle-collapser": "^1.2.1",
"chg": "^0.3.2",
"conventional-changelog-cli": "^1.2.0",
"conventional-changelog-videojs": "^3.0.0",
"es5-shim": "^4.1.3",
"es6-shim": "^0.35.1",
"ghooks": "^1.3.2",
"gkatsev-grunt-sass": "^1.1.1",
"grunt": "^0.4.4",
"grunt-babel": "^6.0.0",
"grunt-accessibility": "^4.1.0",
"grunt-babel": "^6.0.0",
"grunt-banner": "^0.4.0",
"grunt-browserify": "3.5.1",
"grunt-cli": "~0.1.13",
Expand Down Expand Up @@ -97,6 +100,7 @@
"markdown-table": "^1.0.0",
"proxyquireify": "^3.0.0",
"qunitjs": "^1.23.1",
"shelljs-nodecli": "^0.1.1",
"sinon": "^1.16.1",
"time-grunt": "^1.1.1",
"uglify-js": "~2.7.3",
Expand Down