Changesets · Branches · Tags · Compare
| Changeset | b4d5e491c2be3ba25462233ceaff04e735e44d3bbbd1714c5a45789e509dbcfd |
|---|---|
| Author | LuQQiu <luqiujob@gmail.com> · 2024-09-19 10:51 -07:00 |
| Committer | GitHub <noreply@github.com> · 2024-09-19 10:51 -07:00 |
| Parents | b73be5923470 |
7 files changed
modified .bumpversion.toml +28 −6
| @@ -24,34 +24,56 @@ | ||
| 24 | 24 | message = "Bump version: {current_version} → {new_version}" |
| 25 | 25 | commit_args = "" |
| 26 | 26 | |
| 27 | +# Java maven files | |
| 28 | +pre_commit_hooks = [ | |
| 29 | + """ | |
| 30 | + NEW_VERSION="${BVHOOK_NEW_MAJOR}.${BVHOOK_NEW_MINOR}.${BVHOOK_NEW_PATCH}" | |
| 31 | + if [ ! -z "$BVHOOK_NEW_PRE_L" ] && [ ! -z "$BVHOOK_NEW_PRE_N" ]; then | |
| 32 | + NEW_VERSION="${NEW_VERSION}-${BVHOOK_NEW_PRE_L}.${BVHOOK_NEW_PRE_N}" | |
| 33 | + fi | |
| 34 | + echo "Constructed new version: $NEW_VERSION" | |
| 35 | + cd java && mvn versions:set -DnewVersion=$NEW_VERSION && mvn versions:commit | |
| 36 | + | |
| 37 | + # Check for any modified but unstaged pom.xml files | |
| 38 | + MODIFIED_POMS=$(git ls-files -m | grep pom.xml) | |
| 39 | + if [ ! -z "$MODIFIED_POMS" ]; then | |
| 40 | + echo "The following pom.xml files were modified but not staged. Adding them now:" | |
| 41 | + echo "$MODIFIED_POMS" | while read -r file; do | |
| 42 | + git add "$file" | |
| 43 | + echo "Added: $file" | |
| 44 | + done | |
| 45 | + fi | |
| 46 | + """, | |
| 47 | +] | |
| 48 | + | |
| 27 | 49 | [tool.bumpversion.parts.pre_l] |
| 28 | -values = ["beta", "final"] | |
| 29 | 50 | optional_value = "final" |
| 51 | +values = ["beta", "final"] | |
| 30 | 52 | |
| 31 | 53 | [[tool.bumpversion.files]] |
| 32 | 54 | filename = "node/package.json" |
| 33 | -search = "\"version\": \"{current_version}\"," | |
| 34 | 55 | replace = "\"version\": \"{new_version}\"," |
| 56 | +search = "\"version\": \"{current_version}\"," | |
| 35 | 57 | |
| 36 | 58 | [[tool.bumpversion.files]] |
| 37 | 59 | filename = "nodejs/package.json" |
| 38 | -search = "\"version\": \"{current_version}\"," | |
| 39 | 60 | replace = "\"version\": \"{new_version}\"," |
| 61 | +search = "\"version\": \"{current_version}\"," | |
| 40 | 62 | |
| 41 | 63 | # nodejs binary packages |
| 42 | 64 | [[tool.bumpversion.files]] |
| 43 | 65 | glob = "nodejs/npm/*/package.json" |
| 44 | -search = "\"version\": \"{current_version}\"," | |
| 45 | 66 | replace = "\"version\": \"{new_version}\"," |
| 67 | +search = "\"version\": \"{current_version}\"," | |
| 46 | 68 | |
| 47 | 69 | # Cargo files |
| 48 | 70 | # ------------ |
| 49 | 71 | [[tool.bumpversion.files]] |
| 50 | 72 | filename = "rust/ffi/node/Cargo.toml" |
| 51 | -search = "\nversion = \"{current_version}\"" | |
| 52 | 73 | replace = "\nversion = \"{new_version}\"" |
| 74 | +search = "\nversion = \"{current_version}\"" | |
| 53 | 75 | |
| 54 | 76 | [[tool.bumpversion.files]] |
| 55 | 77 | filename = "rust/lancedb/Cargo.toml" |
| 56 | -search = "\nversion = \"{current_version}\"" | |
| 57 | 78 | replace = "\nversion = \"{new_version}\"" |
| 79 | +search = "\nversion = \"{current_version}\"" |
modified .github/workflows/java-publish.yml +5 −0
| @@ -94,11 +94,16 @@ | ||
| 94 | 94 | mkdir -p ./core/target/classes/nativelib/darwin-aarch64 ./core/target/classes/nativelib/linux-aarch64 |
| 95 | 95 | cp ../liblancedb_jni_darwin_aarch64.zip/liblancedb_jni.dylib ./core/target/classes/nativelib/darwin-aarch64/liblancedb_jni.dylib |
| 96 | 96 | cp ../liblancedb_jni_linux_aarch64.zip/liblancedb_jni.so ./core/target/classes/nativelib/linux-aarch64/liblancedb_jni.so |
| 97 | + - name: Dry run | |
| 98 | + if: github.event_name == 'pull_request' | |
| 99 | + run: | | |
| 100 | + mvn --batch-mode -DskipTests package | |
| 97 | 101 | - name: Set github |
| 98 | 102 | run: | |
| 99 | 103 | git config --global user.email "LanceDB Github Runner" |
| 100 | 104 | git config --global user.name "dev+gha@lancedb.com" |
| 101 | 105 | - name: Publish with Java 8 |
| 106 | + if: github.event_name == 'release' | |
| 102 | 107 | run: | |
| 103 | 108 | echo "use-agent" >> ~/.gnupg/gpg.conf |
| 104 | 109 | echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf |
modified .github/workflows/make-release-commit.yml +1 −1
| @@ -30,7 +30,7 @@ | ||
| 30 | 30 | default: true |
| 31 | 31 | type: boolean |
| 32 | 32 | other: |
| 33 | - description: 'Make a Node/Rust release' | |
| 33 | + description: 'Make a Node/Rust/Java release' | |
| 34 | 34 | required: true |
| 35 | 35 | default: true |
| 36 | 36 | type: boolean |
modified java/core/lancedb-jni/Cargo.toml +1 −1
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | name = "lancedb-jni" |
| 3 | 3 | description = "JNI bindings for LanceDB" |
| 4 | 4 | # TODO modify lancedb/Cargo.toml for version and dependencies |
| 5 | -version = "0.4.18" | |
| 5 | +version = "0.10.0" | |
| 6 | 6 | edition.workspace = true |
| 7 | 7 | repository.workspace = true |
| 8 | 8 | readme.workspace = true |
modified java/core/pom.xml +2 −2
| @@ -8,7 +8,7 @@ | ||
| 8 | 8 | <parent> |
| 9 | 9 | <groupId>com.lancedb</groupId> |
| 10 | 10 | <artifactId>lancedb-parent</artifactId> |
| 11 | - <version>0.0.3</version> | |
| 11 | + <version>0.10.0</version> | |
| 12 | 12 | <relativePath>../pom.xml</relativePath> |
| 13 | 13 | </parent> |
| 14 | 14 | |
| @@ -44,7 +44,7 @@ | ||
| 44 | 44 | <dependency> |
| 45 | 45 | <groupId>org.junit.jupiter</groupId> |
| 46 | 46 | <artifactId>junit-jupiter</artifactId> |
| 47 | - <scope>test</scope> | |
| 47 | + <scope>test</scope> | |
| 48 | 48 | </dependency> |
| 49 | 49 | </dependencies> |
| 50 | 50 |
modified java/pom.xml +7 −5
| @@ -6,7 +6,7 @@ | ||
| 6 | 6 | |
| 7 | 7 | <groupId>com.lancedb</groupId> |
| 8 | 8 | <artifactId>lancedb-parent</artifactId> |
| 9 | - <version>0.0.3</version> | |
| 9 | + <version>0.10.0</version> | |
| 10 | 10 | <packaging>pom</packaging> |
| 11 | 11 | |
| 12 | 12 | <name>LanceDB Parent</name> |
| @@ -92,7 +92,7 @@ | ||
| 92 | 92 | </repository> |
| 93 | 93 | </distributionManagement> |
| 94 | 94 | |
| 95 | - <build> | |
| 95 | + <build> | |
| 96 | 96 | <plugins> |
| 97 | 97 | <plugin> |
| 98 | 98 | <groupId>org.apache.maven.plugins</groupId> |
| @@ -167,7 +167,8 @@ | ||
| 167 | 167 | <version>3.2.5</version> |
| 168 | 168 | <configuration> |
| 169 | 169 | <argLine>--add-opens=java.base/java.nio=ALL-UNNAMED</argLine> |
| 170 | - <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/> | |
| 170 | + <forkNode | |
| 171 | + implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory" /> | |
| 171 | 172 | <useSystemClassLoader>false</useSystemClassLoader> |
| 172 | 173 | </configuration> |
| 173 | 174 | </plugin> |
| @@ -183,7 +184,7 @@ | ||
| 183 | 184 | </pluginManagement> |
| 184 | 185 | </build> |
| 185 | 186 | |
| 186 | - <profiles> | |
| 187 | + <profiles> | |
| 187 | 188 | <profile> |
| 188 | 189 | <id>jdk8</id> |
| 189 | 190 | <activation> |
| @@ -210,7 +211,8 @@ | ||
| 210 | 211 | <version>3.2.5</version> |
| 211 | 212 | <configuration> |
| 212 | 213 | <argLine>--add-opens=java.base/java.nio=ALL-UNNAMED</argLine> |
| 213 | - <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory" /> | |
| 214 | + <forkNode | |
| 215 | + implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory" /> | |
| 214 | 216 | <useSystemClassLoader>false</useSystemClassLoader> |
| 215 | 217 | </configuration> |
| 216 | 218 | </plugin> |
modified release_process.md +25 −22
| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | # Release process |
| 2 | 2 | |
| 3 | -There are five total packages we release. Three are the `lancedb` packages | |
| 4 | -for Python, Rust, and Node.js. The other two are the legacy `vectordb` | |
| 5 | -packages for Rust and node.js. | |
| 6 | - | |
| 7 | -The Python package is versioned and released separately from the Rust and Node.js | |
| 8 | -ones. For Rust and Node.js, the release process is shared between `lancedb` and | |
| 3 | +There are five total packages we release. Four are the `lancedb` packages | |
| 4 | +for Python, Rust, Java, and Node.js. The other one is the legacy `vectordb` | |
| 5 | +package node.js. | |
| 6 | + | |
| 7 | +The Python package is versioned and released separately from the Rust, Java, and Node.js | |
| 8 | +ones. For Node.js the release process is shared between `lancedb` and | |
| 9 | 9 | `vectordb` for now. |
| 10 | 10 | |
| 11 | 11 | ## Preview releases |
| @@ -24,20 +24,23 @@ | ||
| 24 | 24 | The release process uses a handful of GitHub actions to automate the process. |
| 25 | 25 | |
| 26 | 26 | ```text |
| 27 | - ┌─────────────────────┐ | |
| 28 | - │Create Release Commit│ | |
| 29 | - └─┬───────────────────┘ | |
| 30 | - │ ┌────────────┐ ┌──►Python GH Release | |
| 31 | - ├──►(tag) python-vX.Y.Z ───►│PyPI Publish├─┤ | |
| 32 | - │ └────────────┘ └──►Python Wheels | |
| 33 | - │ | |
| 34 | - │ ┌───────────┐ | |
| 35 | - └──►(tag) vX.Y.Z ───┬──────►│NPM Publish├──┬──►Rust/Node GH Release | |
| 36 | - │ └───────────┘ │ | |
| 37 | - │ └──►NPM Packages | |
| 38 | - │ ┌─────────────┐ | |
| 39 | - └──────►│Cargo Publish├───►Cargo Release | |
| 40 | - └─────────────┘ | |
| 27 | + ┌─────────────────────┐ | |
| 28 | + │Create Release Commit│ | |
| 29 | + └─┬───────────────────┘ | |
| 30 | + │ ┌────────────┐ ┌──►Python GH Release | |
| 31 | + ├──►(tag) python-vX.Y.Z ───►│PyPI Publish├─┤ | |
| 32 | + │ └────────────┘ └──►Python Wheels | |
| 33 | + │ | |
| 34 | + │ ┌───────────┐ | |
| 35 | + └──►(tag) vX.Y.Z ───┬──────►│NPM Publish├──┬──►Rust/Node GH Release | |
| 36 | + │ └───────────┘ │ | |
| 37 | + │ └──►NPM Packages | |
| 38 | + │ ┌─────────────┐ | |
| 39 | + ├──────►│Cargo Publish├───►Cargo Release | |
| 40 | + │ └─────────────┘ | |
| 41 | + │ ┌─────────────┐ | |
| 42 | + └──────►│Maven Publish├───►Java Maven Repo Release | |
| 43 | + └─────────────┘ | |
| 41 | 44 | ``` |
| 42 | 45 | |
| 43 | 46 | To start a release, trigger a `Create Release Commit` action from |
| @@ -56,10 +59,10 @@ | ||
| 56 | 59 | ## Breaking changes |
| 57 | 60 | |
| 58 | 61 | We try to avoid breaking changes, but sometimes they are necessary. When there |
| 59 | -are breaking changes, we will increment the minor version. (This is valid | |
| 62 | +are breaking changes, we will increment the minor version. (This is valid | |
| 60 | 63 | semantic versioning because we are still in `0.x` versions.) |
| 61 | 64 | |
| 62 | -When a PR makes a breaking change, the PR author should mark the PR using the | |
| 65 | +When a PR makes a breaking change, the PR author should mark the PR using the | |
| 63 | 66 | conventional commit markers: either exclamation mark after the type |
| 64 | 67 | (such as `feat!: change signature of func`) or have `BREAKING CHANGE` in the |
| 65 | 68 | body of the PR. A CI job will add a `breaking-change` label to the PR, which is |