-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from bizob2828/third-party-notices-automation
added husky + lint staged and hook to update third party manifest/notices
- Loading branch information
Showing
8 changed files
with
11,594 additions
and
4,519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/../bin/update-third-party-notices.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"**/*.js": [ | ||
"eslint --fix" | ||
] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
----- | ||
|
||
Portions copyright Node.js contributors. Depending on your existing libraries and package management settings, | ||
your systems may call externally maintained libraries in addition to those listed above. | ||
See [here](https://nodejs.org/en/docs/meta/topics/dependencies/) and [here](https://github.com/nodejs/node/blob/v4.3.1/LICENSE) | ||
for additional details regarding externally maintained libraries and certain related licenses and notices. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
# | ||
# Checks all staged files for | ||
# package.json. If it changes | ||
# it will re-run `oss third-party manifest` | ||
# and `oss third-party notices` to keep | ||
# these files up to date as deps get updated | ||
|
||
STAGED_FILES=$(git diff-index --cached --name-only HEAD) | ||
|
||
for FILE in $STAGED_FILES | ||
do | ||
if [ $FILE == "package.json" ]; then | ||
RUN_THIRD_PARTY=1 | ||
break | ||
fi | ||
done | ||
|
||
if [ -n "$RUN_THIRD_PARTY" ]; then | ||
echo "package.json changed, running oss manifest and notices" | ||
npm run third-party-updates | ||
fi |
Oops, something went wrong.