Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use same version for bitwarden crates #663

Merged
merged 6 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
51 changes: 8 additions & 43 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ on:
type: choice
options:
- bitwarden
- bitwarden-api-api
- bitwarden-api-identity
- bitwarden-crypto
- bitwarden-generators
- bitwarden-json
- cli
- bws
- napi
- python-sdk
- ruby-sdk
Expand All @@ -43,7 +38,7 @@ jobs:
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Install cargo-release
run: cargo install cargo-edit
run: cargo install cargo-edit --locked

- name: Login to Azure - CI Subscription
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
Expand Down Expand Up @@ -101,49 +96,19 @@ jobs:

- name: Bump napi crate Version
if: ${{ inputs.project == 'napi' }}
run: cargo-set-version set-version -p bitwarden-napi ${{ inputs.version_number }}
run: cargo set-version -p bitwarden-napi ${{ inputs.version_number }}

### bitwarden

- name: Bump bitwarden crate Version
if: ${{ inputs.project == 'bitwarden' }}
run: cargo-set-version set-version -p bitwarden ${{ inputs.version_number }}
run: cargo set-version -p bitwarden ${{ inputs.version_number }}

### bitwarden-api-api
### bws

- name: Bump bitwarden-api-api crate Version
if: ${{ inputs.project == 'bitwarden-api-api' }}
run: cargo-set-version set-version -p bitwarden-api-api ${{ inputs.version_number }}

### bitwarden-api-identity

- name: Bump bitwarden-api-identity crate Version
if: ${{ inputs.project == 'bitwarden-api-identity' }}
run: cargo-set-version set-version -p bitwarden-api-identity ${{ inputs.version_number }}

### bitwarden-crypto

- name: Bump bitwarden-crypto crate Version
if: ${{ inputs.project == 'bitwarden-crypto' }}
run: cargo-set-version set-version -p bitwarden-crypto ${{ inputs.version_number }}

### bitwarden-generators

- name: Bump bitwarden-generators crate Version
if: ${{ inputs.project == 'bitwarden-generators' }}
run: cargo-set-version set-version -p bitwarden-generators ${{ inputs.version_number }}

### cli

- name: Bump cli Version
if: ${{ inputs.project == 'cli' }}
run: cargo-set-version set-version -p bws ${{ inputs.version_number }}

### bitwarden-json

- name: Bump bitwarden-json crate Version
if: ${{ inputs.project == 'bitwarden-json' }}
run: cargo-set-version set-version -p bitwarden-json ${{ inputs.version_number }}
- name: Bump bws Version
if: ${{ inputs.project == 'bws' }}
run: cargo set-version -p bws ${{ inputs.version_number }}

### python
- name: Bump python-sdk Version
Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ members = ["crates/*"]

# Global settings for all crates should be defined here
[workspace.package]
# Update using `cargo set-version -p bitwarden <new-version>`
version = "0.4.0"
authors = ["Bitwarden Inc"]
edition = "2021"
# Note: Changing rust-version should be considered a breaking change
Expand All @@ -15,12 +17,12 @@ keywords = ["bitwarden"]

# Define dependencies that are expected to be consistent across all crates
[workspace.dependencies]
bitwarden = { path = "crates/bitwarden", version = "0.4.0" }
bitwarden-api-api = { path = "crates/bitwarden-api-api", version = "0.2.3" }
bitwarden-api-identity = { path = "crates/bitwarden-api-identity", version = "=0.2.3" }
bitwarden-crypto = { path = "crates/bitwarden-crypto", version = "=0.1.0" }
bitwarden-exporters = { path = "crates/bitwarden-exporters", version = "=0.1.0" }
bitwarden-generators = { path = "crates/bitwarden-generators", version = "=0.1.0" }
bitwarden = { path = "crates/bitwarden", version = "=0.4.0" }
bitwarden-api-api = { path = "crates/bitwarden-api-api", version = "=0.4.0" }
bitwarden-api-identity = { path = "crates/bitwarden-api-identity", version = "=0.4.0" }
bitwarden-crypto = { path = "crates/bitwarden-crypto", version = "=0.4.0" }
bitwarden-exporters = { path = "crates/bitwarden-exporters", version = "=0.4.0" }
bitwarden-generators = { path = "crates/bitwarden-generators", version = "=0.4.0" }

# Compile all dependencies with some optimizations when building this crate on debug
# This slows down clean builds by about 50%, but the resulting binaries can be orders of magnitude faster
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-api-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "bitwarden-api-api"
version = "0.2.3"
description = """
Api bindings for the Bitwarden API.
"""
categories = ["api-bindings"]

version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-api-identity/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "bitwarden-api-identity"
version = "0.2.3"
description = """
Api bindings for the Bitwarden Identity API.
"""
categories = ["api-bindings"]

version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bitwarden-cli"
version = "0.1.0"

version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "bitwarden-crypto"
version = "0.1.0"
description = """
Internal crate for the bitwarden crate. Do not use.
"""

version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-exporters/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "bitwarden-exporters"
version = "0.1.0"
description = """
Internal crate for the bitwarden crate. Do not use.
"""
exclude = ["/resources"]

version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-generators/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "bitwarden-generators"
version = "0.1.0"
description = """
Internal crate for the bitwarden crate. Do not use.
"""

version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions crates/bitwarden-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ secrets = ["bitwarden/secrets"] # Secrets manager API

[dependencies]
async-lock = ">=3.3.0, <4.0"
bitwarden = { workspace = true }
log = ">=0.4.18, <0.5"
schemars = ">=0.8.12, <0.9"
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"

bitwarden = { workspace = true }
7 changes: 3 additions & 4 deletions crates/bitwarden-napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ license-file.workspace = true
crate-type = ["cdylib", "rlib"]

[dependencies]
bitwarden-json = { path = "../bitwarden-json", version = "0.3.0", features = [
"secrets",
] }
env_logger = "0.11.1"
log = "0.4.20"
napi = { version = "2", features = ["async"] }
napi-derive = "2"

bitwarden-json = { path = "../bitwarden-json", version = "0.3.0", features = [
"secrets",
] }

[build-dependencies]
napi-build = "2.1.0"

Expand Down
3 changes: 1 addition & 2 deletions crates/bitwarden-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ name = "bitwarden_py"
crate-type = ["cdylib"]

[dependencies]
bitwarden-json = { path = "../bitwarden-json", features = ["secrets"] }
pyo3 = { version = "0.20.2", features = ["extension-module"] }
pyo3-log = "0.9.0"

bitwarden-json = { path = "../bitwarden-json", features = ["secrets"] }

[build-dependencies]
pyo3-build-config = { version = "0.20.2" }

Expand Down
7 changes: 3 additions & 4 deletions crates/bitwarden-uniffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ bench = false

[dependencies]
async-lock = "3.3.0"
bitwarden = { workspace = true, features = ["mobile", "internal"] }
bitwarden-crypto = { workspace = true, features = ["mobile"] }
bitwarden-generators = { workspace = true, features = ["mobile"] }
chrono = { version = ">=0.4.26, <0.5", features = [
"serde",
"std",
Expand All @@ -27,9 +30,5 @@ env_logger = "0.11.1"
schemars = { version = ">=0.8, <0.9", optional = true }
uniffi = "=0.26.1"

bitwarden = { workspace = true, features = ["mobile", "internal"] }
bitwarden-crypto = { workspace = true, features = ["mobile"] }
bitwarden-generators = { workspace = true, features = ["mobile"] }

[build-dependencies]
uniffi = { version = "=0.26.1", features = ["build"] }
9 changes: 4 additions & 5 deletions crates/bitwarden-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ keywords.workspace = true
crate-type = ["cdylib"]

[dependencies]
bitwarden-json = { path = "../bitwarden-json", features = [
"secrets",
"internal",
] }
console_error_panic_hook = "0.1.7"
console_log = { version = "1.0.0", features = ["color"] }
js-sys = "0.3.68"
Expand All @@ -23,10 +27,5 @@ serde = { version = "1.0.196", features = ["derive"] }
wasm-bindgen = { version = "0.2.91", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.41"

bitwarden-json = { path = "../bitwarden-json", features = [
"secrets",
"internal",
] }

[dev-dependencies]
wasm-bindgen-test = "0.3.41"
2 changes: 1 addition & 1 deletion crates/bitwarden/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "bitwarden"
version = "0.4.0"
description = """
Bitwarden Secrets Manager SDK
"""
keywords = ["bitwarden", "secrets-manager"]

version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions crates/bw/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ repository.workspace = true
license-file.workspace = true

[dependencies]
bitwarden = { workspace = true, features = ["internal", "mobile"] }
bitwarden-cli = { path = "../bitwarden-cli", version = "0.4.0" }
clap = { version = "4.5.1", features = ["derive", "env"] }
color-eyre = "0.6"
env_logger = "0.11.1"
inquire = "0.6.2"
log = "0.4.20"
tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros"] }

bitwarden = { workspace = true, features = ["internal", "mobile"] }
bitwarden-cli = { path = "../bitwarden-cli", version = "0.1.0" }

[dev-dependencies]
tempfile = "3.10.0"
3 changes: 1 addition & 2 deletions crates/bws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ license-file.workspace = true
bat = { version = "0.24.0", features = [
"regex-onig",
], default-features = false }
bitwarden = { workspace = true, features = ["secrets"] }
chrono = { version = "0.4.34", features = [
"clock",
"std",
Expand All @@ -42,7 +43,5 @@ tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros"] }
toml = "0.8.10"
uuid = { version = "^1.7.0", features = ["serde"] }

bitwarden = { workspace = true, features = ["secrets"] }

[dev-dependencies]
tempfile = "3.10.0"
7 changes: 3 additions & 4 deletions crates/sdk-schemas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ internal = [

[dependencies]
anyhow = "1.0.79"
bitwarden = { workspace = true }
bitwarden-json = { path = "../bitwarden-json" }
bitwarden-uniffi = { path = "../bitwarden-uniffi" }
itertools = "0.12.1"
schemars = { version = "0.8.16", features = ["preserve_order"] }
serde_json = "1.0.113"

bitwarden = { path = "../bitwarden" }
bitwarden-json = { path = "../bitwarden-json" }
bitwarden-uniffi = { path = "../bitwarden-uniffi" }
Loading