-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
17 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# NPM libraries | ||
node_modules | ||
dist | ||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Editor settings | ||
.vscode | ||
|
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Reference: NPM RRFC --if-needed https://github.com/npm/rfcs/issues/466 | ||
|
||
LOCAL_SHASUM=$(npm pack --json | jq '.[] | .shasum' | sed -r 's/^"|"$//g') | ||
|
||
NPM_TARBALL=$(npm show @dfinity/verifiable-credentials dist.tarball) | ||
NPM_SHASUM=$(curl -s "$NPM_TARBALL" 2>&1 | shasum | cut -f1 -d' ') | ||
|
||
if [ "$LOCAL_SHASUM" == "$NPM_SHASUM" ]; then | ||
echo "No changes in @dfinity/verifiable-credentials need to be published to NPM." | ||
else | ||
npm publish --provenance --access public | ||
fi |