Changes: * Refactors the Node module to load the shared library from a separate package. When a user does `npm install vectordb`, the correct optional dependency is automatically downloaded by npm. * Brings Rust and Node versions in alignment at 0.1.2. * Add scripts and instructions to build Linux and MacOS node artifacts locally. * Add instructions for publishing the npm module and crates.
2.8 KiB
How to release
This is for the Rust crate and Node module. For now, the Python module is released separately.
Manual process
The manual release process can be completed on a MacOS machine.
Bump the versions
You can use the script ci/bump_versions.sh to bump the versions. It defaults
to a patch bump, but you can also pass minor and major. Once you have the
tag created, push it to GitHub.
VERSION=$(bash ci/bump_versions.sh)
git tag v$VERSION
git push origin v$VERSION
Build the MacOS release libraries
One-time setup:
rustup target add x86_64-apple-darwin aarch64-apple-darwin
To build both x64 and arm64, run ci/build_macos_artifacts.sh without any args:
bash ci/build_macos_artifacts.sh
Build the Linux release libraries
To build a Linux library, we need to use docker with a different build script:
ARCH=aarch64
docker run \
-v $(pwd):/io -w /io \
quay.io/pypa/manylinux2014_$ARCH \
bash ci/build_linux_artifacts.sh $ARCH-unknown-linux-gnu
For x64, change ARCH to x86_64. NOTE: compiling for a different architecture
than your machine in Docker is very slow. It's best to do this on a machine with
matching architecture.
Build the npm module
To build the typescript and create a release tarball, run:
npm ci
npm tsc
npm pack
Release to npm
Assuming you still have VERSION set from earlier:
pushd node
npm publish lancedb-vectordb-$VERSION.tgz
for tarball in ./dist/lancedb-vectordb-*-$VERSION.tgz;
do
npm publish $tarball
done
popd
Release to crates.io
cargo publish -p vectordb
cargo publish -p vectordb-node