Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,16 @@ This gRPC library depends on the `protobuf-ts` package, which is not compatible

## How to publish

Make sure that you're on a clean commit, and all version numbers have been updated.
Make sure that you're on a clean commit, then:

```bash
VERSION=0.0.X

git tag modal-go/v$VERSION
git push --tags
GOPROXY=proxy.golang.org go list -m github.com/modal-labs/libmodal/modal-go@v$VERSION
npm version patch # will build, bump the version, commit, tag, push, and npm publish
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually see where we're bumping the version here for JS but I could be missing it!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, there's https://docs.npmjs.com/cli/v8/commands/npm-version

So npm version minor would also work. Nice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly! Somewhat magic...

```

```bash
VERSION=0.0.X

# Note: Edit package.json first
npm run build
npm publish
GO_VERSION=0.0.X

git tag modal-js/v$VERSION
git tag modal-go/v$GO_VERSION
git push --tags
GOPROXY=proxy.golang.org go list -m github.com/modal-labs/libmodal/modal-go@v$GO_VERSION
```
5 changes: 4 additions & 1 deletion modal-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
"format:check": "prettier --check .",
"lint": "eslint",
"prepare": "scripts/gen-proto.sh",
"test": "vitest"
"test": "vitest",
"preversion": "(git update-index --really-refresh && git diff-index --quiet HEAD) || (echo 'You must commit all changes before running npm version' && exit 1)",
"version": "npm run build && git add package.json package-lock.json && git commit -m \"modal-js/v$npm_package_version\" && git tag modal-js/v$npm_package_version",
"postversion": "git push && git push --tags && npm publish"
},
"dependencies": {
"long": "^5.3.1",
Expand Down