Skip to content

Commit

Permalink
Build: Replace grunt-git-authors dependency with simple git-log command
Browse files Browse the repository at this point in the history
I considered using git-shortlog as
`git shortlog -se --format='%aE' --no-merges`, which indeed gets us
fairly close. But, the available sort options there (as of git 2.41.0)
are by name or by count, not by first appearance.

So, instead, use git log, and pipe it to awk to deduplicate. This
is similar to piping to `sort | uniq`, except without the sorting.
  • Loading branch information
Krinkle committed Apr 4, 2024
1 parent e9e8a2d commit da8d57e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
31 changes: 0 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"grunt-contrib-connect": "^3.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-qunit": "^5.1.1",
"grunt-git-authors": "^3.2.0",
"grunt-search": "^0.1.8",
"kleur": "4.1.5",
"npm-reporter": "file:./test/cli/fixtures/npm-reporter",
Expand All @@ -96,7 +95,7 @@
"test-nolint": "npm run build && npm run test-main && npm run test-cli",
"test-integration": "npm run build && node bin/qunit.js test/integration/*.js",
"browserstack": "browserstack-runner -v",
"authors": "grunt authors",
"authors": "(echo 'Authors ordered by first contribution\n' && git log --format='%aN <%aE>' --no-merges --reverse | awk '!seen[$0]++') | tee AUTHORS.txt",
"coverage": "npm run build-coverage && npm run coverage-cli && npm run coverage-main && nyc report",
"coverage-cli": "nyc --use-spawn-wrap --silent bin/qunit.js test/cli/*.js",
"coverage-main": "nyc instrument --in-place qunit/ && grunt connect:base qunit"
Expand Down

0 comments on commit da8d57e

Please sign in to comment.