Skip to content

Commit

Permalink
fix(add arg releasecount to changelog script): for eg: yarn generate:…
Browse files Browse the repository at this point in the history
…changelog --releaseCount 1
  • Loading branch information
imbhargav5 committed Apr 21, 2021
1 parent 686c42e commit cfbd59a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## (2021-04-20)
## (2021-04-21)

* feat(add fetch-depth 0 for changelog): changelog requires more git history ([618b2f6](https://github.com/imbhargav5/rooks/commit/618b2f6))
* feat(run changelog on main push): run changelog on main push ([d8d4608](https://github.com/imbhargav5/rooks/commit/d8d4608))
Expand Down
4 changes: 3 additions & 1 deletion Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ var conventionalChangelog = require('gulp-conventional-changelog');
const IGNORE_COMMIT_PATTERS = [`[skip ci]`, `[create-pull-request]`];

gulp.task('changelog', function () {
var argv = require('yargs').argv;
const { releaseCount = 0 } = argv;
return gulp
.src('CHANGELOG.md')
.pipe(
conventionalChangelog(
{
// conventional-changelog options go here
//preset: 'angular'
releaseCount: 0,
releaseCount: releaseCount,
sameFile: true,
},
{
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
"vfile-reporter": "^6.0.1",
"webpack": "4.46.0",
"webpack-cli": "^4.2.0",
"write-pkg": "3.2.0"
"write-pkg": "3.2.0",
"yargs": "^16.2.0"
},
"workspaces": {
"packages": [
Expand All @@ -132,7 +133,7 @@
"nohoist": [
"**/html-minifier-terser"
]
},
},
"husky": {
"hooks": {
"pre-commit": "if [[ $IS_GH_ACTION != 1 ]]; then lint-staged; fi;"
Expand Down
31 changes: 29 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5428,6 +5428,15 @@ cliui@^6.0.0:
strip-ansi "^6.0.0"
wrap-ansi "^6.2.0"

cliui@^7.0.2:
version "7.0.4"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
dependencies:
string-width "^4.2.0"
strip-ansi "^6.0.0"
wrap-ansi "^7.0.0"

clone-buffer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
Expand Down Expand Up @@ -8257,7 +8266,7 @@ get-caller-file@^1.0.1:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==

get-caller-file@^2.0.1:
get-caller-file@^2.0.1, get-caller-file@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
Expand Down Expand Up @@ -18672,6 +18681,11 @@ y18n@^4.0.0:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf"
integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==

y18n@^5.0.5:
version "5.0.8"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==

yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
Expand Down Expand Up @@ -18731,7 +18745,7 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^20.2.3:
yargs-parser@^20.2.2, yargs-parser@^20.2.3:
version "20.2.7"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a"
integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==
Expand Down Expand Up @@ -18786,6 +18800,19 @@ yargs@^15.4.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"

yargs@^16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
dependencies:
cliui "^7.0.2"
escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.0"
y18n "^5.0.5"
yargs-parser "^20.2.2"

yargs@^7.1.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.1.tgz#67f0ef52e228d4ee0d6311acede8850f53464df6"
Expand Down

0 comments on commit cfbd59a

Please sign in to comment.