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
19 changes: 7 additions & 12 deletions .github/workflows/publish-macros.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish eventstore-macros
name: Publish kurrentdb-macros

on:
workflow_dispatch:
Expand All @@ -7,26 +7,21 @@ jobs:
publish:
runs-on: ubuntu-latest
environment: CRATES_IO_TOKEN
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

- name: Verify version is new
run: |
LOCAL=$(cargo metadata --no-deps --format-version 1 \
| jq -r '.packages[] | select(.name=="eventstore-macros") | .version')
REMOTE=$(cargo search eventstore-macros --limit 1 \
| sed -nE 's/^eventstore-macros = "([^"]+)".*/\1/p')
| jq -r '.packages[] | select(.name=="kurrentdb-macros") | .version')
REMOTE=$(cargo search kurrentdb-macros --limit 1 \
| sed -nE 's/^kurrentdb-macros = "([^"]+)".*/\1/p')
echo "local=$LOCAL remote=$REMOTE"
if [ "$LOCAL" = "$REMOTE" ]; then
echo "Version $LOCAL is already published on crates.io. Bump eventstore-macros/Cargo.toml first."
echo "Version $LOCAL is already published on crates.io. Bump kurrentdb-macros/Cargo.toml first."
exit 1
fi

- uses: rust-lang/crates-io-auth-action@v1
id: auth

- run: cargo publish -p eventstore-macros
- run: cargo publish -p kurrentdb-macros
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ members = [
"kurrentdb-extras",

# internals
"eventstore-macros",
"kurrentdb-macros",
"examples"
]
6 changes: 3 additions & 3 deletions eventstore-macros/Cargo.toml → kurrentdb-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "eventstore-macros"
version = "0.0.2"
name = "kurrentdb-macros"
version = "0.0.1"
edition = "2021"
license = "MIT"

description = "Extra KurrentDB gRPC client internal code generation features"
description = "Internal proc-macros for the KurrentDB Rust client"
keywords = ["database", "eventsourcing", "eventstore", "kurrent", "grpc"]
repository = "https://github.com/kurrent-io/KurrentDB-Client-Rust"
categories = ["database", "api-bindings"]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion kurrentdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ chrono = { version = "0.4", default-features = false, features = [
"serde",
"now",
] }
eventstore-macros = { path = "../eventstore-macros", version = "0.0.2" }
kurrentdb-macros = { path = "../kurrentdb-macros", version = "0.0.1" }
futures = "0.3"
http = "1"
hyper = { version = "1", features = ["client"] }
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/operations/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use eventstore_macros::{options, streaming};
use futures::stream::TryStreamExt;
use kurrentdb_macros::{options, streaming};
use std::time::SystemTime;
use std::{collections::HashMap, time::Duration};

Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/append_to_stream.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::event_store::client::streams::append_req::options::ExpectedStreamRevision;
use crate::private::Sealed;
use crate::{EventData, StreamState};
use eventstore_macros::options;
use kurrentdb_macros::options;

options! {
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/batch_append.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use eventstore_macros::{options, streaming};
use kurrentdb_macros::{options, streaming};

options! {
#[derive(Clone, Default)]
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/delete_stream.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::StreamState;
use eventstore_macros::options;
use kurrentdb_macros::options;

options! {
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/persistent_subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
PersistentSubscriptionSettings, Position, StreamPosition, SubscriptionFilter,
SystemConsumerStrategy,
};
use eventstore_macros::{options, streaming};
use kurrentdb_macros::{options, streaming};
use std::time::Duration;

options! {
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/projections.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use eventstore_macros::options;
use kurrentdb_macros::options;

options! {
#[derive(Clone, Default)]
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/read_all.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{Position, ReadDirection, StreamPosition, SubscriptionFilter};
use eventstore_macros::{options, streaming};
use kurrentdb_macros::{options, streaming};

options! {
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/read_stream.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{ReadDirection, StreamPosition};
use eventstore_macros::{options, streaming};
use kurrentdb_macros::{options, streaming};

options! {
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/subscribe_to_all.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::options::retry::RetryOptions;
use crate::{Position, StreamPosition, SubscriptionFilter};
use eventstore_macros::{options, streaming};
use kurrentdb_macros::{options, streaming};

options! {
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/subscribe_to_stream.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::StreamPosition;
use crate::options::retry::RetryOptions;
use eventstore_macros::{options, streaming};
use kurrentdb_macros::{options, streaming};

options! {
#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion kurrentdb/src/options/tombstone_stream.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::StreamState;
use eventstore_macros::options;
use kurrentdb_macros::options;

options! {
#[derive(Clone)]
Expand Down
Loading