Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
fix publish bug, update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusnewton committed Sep 20, 2021
1 parent 7bcf04a commit 27ea9f0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 10 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,27 @@ Navigate to http://localhost:3000/ to view the docs site generated with Docusaur

Documentation files are written in Markdown and can be found under the `docs/` directory in this repo. The main config file can be found at `docusaurus/docusaurus.config.js`, and sidebar config at `docusaurus/siderbars.js`

### Publish npm Package

Inside nix-shell run `prepublish`

This will bump package version for to a new patch version,

Please manually commit this change, and push up to the GitHub repo.

Now, you can either tag this commit locally and push it up, or directly cut a release on the GitHub repo (if you're having issues tagging the commit locally)

Locally:
e.g.
```
git tag v0.0.1 -am "0.0.1"
git push origin v0.0.1
```

Remotely:
Go to Releases -> Draft a new release
Select this branch and create a new tag for this commit e.g. `v0.0.1`

### Audits

Audits can be found in the `audits` folder.
Expand Down
42 changes: 32 additions & 10 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,43 @@ let
npm run build
cp artifacts/contracts/**/*.json artifacts
rm artifacts/*.dbg.json
rm artifacts/*Test*
rm artifacts/*Reentrant*
rm artifacts/*ForceSendEther*
rm artifacts/*Mock*
rm -rf artifacts/*.dbg.json
rm -rf artifacts/*Test*
rm -rf artifacts/*Reentrant*
rm -rf artifacts/*ForceSendEther*
rm -rf artifacts/*Mock*
rm typechain/**/*Test*
rm typechain/**/*Reentrant*
rm typechain/**/*ForceSendEther*
rm typechain/**/*Mock*
rm -rf typechain/**/*Test*
rm -rf typechain/**/*Reentrant*
rm -rf typechain/**/*ForceSendEther*
rm -rf typechain/**/*Mock*
'';

prepublish = pkgs.writeShellScriptBin "prepublish" ''
npm version patch --no-git-tag-version
# manually commit and tag
PACKAGE_NAME=$(node -p "require('./package.json').name")
PACKAGE_VERSION=$(node -p "require('./package.json').version")
cat << EOF
Package version for $PACKAGE_NAME bumped to $PACKAGE_VERSION
Please manually commit this change, and push up to the GitHub repo.
Now, you should either:
- tag this commit locally and push it up
- remotely cut a release on the GitHub repo (if you're having issues tagging the commit locally)
Locally:
$ git tag v$PACKAGE_VERSION -am "$PACKAGE_VERSION"
$ git push origin v$PACKAGE_VERSION
Remotely:
Go to Releases -> Draft a new release
Select this branch and create a new release with the following tag: v$PACKAGE_VERSION
EOF
'';

publish = pkgs.writeShellScriptBin "publish" ''
Expand Down

0 comments on commit 27ea9f0

Please sign in to comment.