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
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ version = "0.1.3"
edition = "2021"
license = "MIT"
repository = "https://github.com/kacy/ember"
keywords = ["cache", "redis", "key-value", "database", "distributed"]
categories = ["caching", "database-implementations"]

[workspace.dependencies]
# async runtime
Expand Down
38 changes: 37 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.PHONY: build release test fmt fmt-check clippy check clean docker-build \
release-patch release-minor release-major github-release
release-patch release-minor release-major github-release \
publish publish-dry-run

# extract the workspace version from the root Cargo.toml
VERSION = $(shell sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml)
Expand Down Expand Up @@ -64,3 +65,38 @@ release-major:

github-release:
gh release create "v$(VERSION)" --title "v$(VERSION)" --generate-notes

# --- crates.io publishing ---
#
# usage:
# make publish-dry-run # verify all crates can be packaged
# make publish # publish all crates to crates.io (requires login)
#
# crates are published in dependency order:
# 1. ember-persistence, ember-protocol, ember-cluster (no internal deps)
# 2. emberkv-core (depends on persistence, protocol)
# 3. ember-server (depends on core, protocol, persistence)
# 4. emberkv-cli (standalone)

CRATES_ORDER = ember-persistence ember-protocol ember-cluster emberkv-core ember-server emberkv-cli

publish-dry-run:
@echo "dry run: checking all crates can be packaged..."
@for crate in $(CRATES_ORDER); do \
echo " checking $$crate..."; \
cargo publish --dry-run -p $$crate || exit 1; \
done
@echo "all crates passed dry run"

publish:
@echo "publishing crates to crates.io..."
@echo "note: each crate needs time to index before dependents can be published"
@for crate in $(CRATES_ORDER); do \
echo ""; \
echo "publishing $$crate..."; \
cargo publish -p $$crate || exit 1; \
echo "waiting for crates.io to index $$crate..."; \
sleep 30; \
done
@echo ""
@echo "all crates published successfully"
2 changes: 2 additions & 0 deletions crates/ember-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"

[[bin]]
Expand Down
2 changes: 2 additions & 0 deletions crates/ember-cluster/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"

[dependencies]
Expand Down
2 changes: 2 additions & 0 deletions crates/ember-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"

[lib]
Expand Down
2 changes: 2 additions & 0 deletions crates/ember-persistence/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"

[dependencies]
Expand Down
2 changes: 2 additions & 0 deletions crates/ember-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"

[dependencies]
Expand Down
2 changes: 2 additions & 0 deletions crates/ember-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"

[dependencies]
Expand Down