Skip to content

Commit

Permalink
chore: unify version for packages (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored Jul 11, 2023
1 parent 8e7f9e1 commit 0051173
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 54 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/bindings.nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
Expand Down Expand Up @@ -99,9 +101,12 @@ jobs:
path: bindings/nodejs/*.node

publish:
if: github.event_name == 'push'
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- name: Setup node
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/publish.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@ jobs:
7z a -tzip dist/bendsql-${{ matrix.target }}.zip target/${{ matrix.target }}/release/bendsql.exe
gh release upload ${{ github.ref_name }} dist/bendsql-${{ matrix.target }}.zip --clobber
crates:
needs: build_linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Cargo Release
run: |
curl -fsSLo /tmp/cargo-release.tar.gz https://github.com/crate-ci/cargo-release/releases/download/v0.24.8/cargo-release-v0.24.8-x86_64-unknown-linux-gnu.tar.gz
mkdir -p /tmp/cargo-release
tar -C /tmp/cargo-release -xzf /tmp/cargo-release.tar.gz
sudo mv /tmp/cargo-release/cargo-release /usr/local/bin
- name: Release to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo release publish --execute --no-confirm
distribution:
needs: build_linux
runs-on: ubuntu-latest
Expand Down
14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
[workspace]
default-members = ["core", "driver", "cli"]
members = [
"core",
"driver",
"cli",
"bindings/python",
"bindings/nodejs",
]

[workspace.package]
version = "0.4.1"
edition = "2021"
license = "Apache-2.0"
authors = ["Databend Authors <opensource@datafuselabs.com>"]
categories = ["database"]
keywords = ["databend", "database"]
repository = "https://github.com/datafuselabs/bendsql"

[workspace.dependencies]
databend-client = { path = "core", version = "0.4.1" }
databend-driver = { path = "driver", version = "0.4.1" }
11 changes: 7 additions & 4 deletions bindings/nodejs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
[package]
name = "bindings-nodejs"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
publish = false

version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }

[lib]
crate-type = ["cdylib"]
doc = false

[dependencies]
databend-driver = { path = "../../driver", version = "0.3.1", features = ["rustls", "flight-sql"] }
databend-driver = { workspace = true, features = ["rustls", "flight-sql"] }
futures = "0.3.28"
napi = { version = "2.13.2", default-features = false, features = [
"napi6",
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databend-driver/lib-darwin-arm64",
"repository": "https://github.com/datafuselabs/bendsql.git",
"version": "0.1.0",
"version": "0.4.1",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databend-driver/lib-darwin-x64",
"repository": "https://github.com/datafuselabs/bendsql.git",
"version": "0.1.0",
"version": "0.4.1",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databend-driver/lib-linux-x64-gnu",
"repository": "https://github.com/datafuselabs/bendsql.git",
"version": "0.1.0",
"version": "0.4.1",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databend-driver/lib-win32-x64-msvc",
"repository": "https://github.com/datafuselabs/bendsql.git",
"version": "0.1.0",
"version": "0.4.1",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "databend-driver",
"author": "Databend Authors <opensource@datafuselabs.com>",
"version": "0.1.0",
"version": "0.4.1",
"license": "Apache-2.0",
"main": "index.js",
"types": "index.d.ts",
Expand Down
14 changes: 9 additions & 5 deletions bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,23 @@

[package]
name = "databend-python"
version = "0.0.1"
edition = "2021"
license = "Apache-2.0"
publish = false

version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }

[lib]
crate-type = ["cdylib"]
doc = false

[dependencies]
databend-client = { workspace = true }
databend-driver = { workspace = true, features = ["rustls", "flight-sql"] }

chrono = { version = "0.4.24", default-features = false, features = ["std"] }
databend-client = { version = "0.2.0", path = "../../core" }
databend-driver = { path = "../../driver", version = "0.3.0", features = ["rustls", "flight-sql"] }
futures = "0.3.28"
pyo3 = { version = "0.18", features = ["abi3-py37"] }
pyo3-asyncio = { version = "0.18", features = ["tokio-runtime"] }
Expand Down
13 changes: 8 additions & 5 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
[package]
name = "bendsql"
version = "0.4.1"
edition = "2021"
license = "Apache-2.0"
description = "Databend Native Command Line Tool"
categories = ["database"]
keywords = ["databend", "database", "cli"]
repository = "https://github.com/datafuselabs/databend-client"

version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }

[dependencies]
databend-driver = { workspace = true, features = ["rustls", "flight-sql"] }

anyhow = "1.0.70"
async-trait = "0.1.68"
chrono = { version = "0.4.24", default-features = false, features = ["clock"] }
clap = { version = "4.1.0", features = ["derive", "env"] }
comfy-table = "6.1.4"
csv = "1.2.1"
databend-driver = { path = "../driver", version = "0.3.1", features = ["rustls", "flight-sql"] }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
humantime-serde = "1.1.1"
indicatif = "0.17.3"
Expand Down
10 changes: 6 additions & 4 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[package]
name = "databend-client"
version = "0.2.1"
edition = "2021"
license = "Apache-2.0"
description = "Databend Client for Rust"
categories = ["database"]
keywords = ["databend", "database", "sdk"]
repository = "https://github.com/datafuselabs/databend-client"

version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }

[features]
default = ["rustls"]
Expand Down
13 changes: 8 additions & 5 deletions driver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[package]
name = "databend-driver"
version = "0.3.1"
edition = "2021"
license = "Apache-2.0"
description = "Databend Driver for Rust"
categories = ["database"]
keywords = ["databend", "database", "sdk"]
repository = "https://github.com/datafuselabs/databend-client"

version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }

[features]
default = ["rustls"]
Expand All @@ -19,9 +21,10 @@ native-tls = ["databend-client/native-tls"]
flight-sql = ["dep:arrow-array", "dep:arrow-cast", "dep:arrow-flight", "dep:arrow-schema", "dep:tonic"]

[dependencies]
databend-client = { workspace = true }

async-trait = "0.1.68"
chrono = { version = "0.4.24", default-features = false, features = ["clock"] }
databend-client = { version = "0.2.1", path = "../core" }
dyn-clone = "1.0.11"
http = "0.2.9"
percent-encoding = "2.2.0"
Expand Down

0 comments on commit 0051173

Please sign in to comment.