Skip to content

Commit e619b1a

Browse files
committed
Makefile target for publishing to crates.io
1 parent b9e58e0 commit e619b1a

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

Makefile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
bench_output := target/criterion
2+
version := $(egrep '^version.*=.*' Cargo.toml | egrep -o "\d+\.\d+\.\d+")
23

3-
.PHONY: all bench buildci buildrelease install cov
4+
.PHONY: all bench buildci buildrelease install cov publish
45

56
all: buildrelease
67

8+
builddev:
9+
cargo doc --lib
10+
cargo clippy -- -D warnings
11+
cargo fmt --all -- --check
12+
cargo test
13+
714
buildci:
815
cargo clippy --workspace -- -D warnings
916
cargo fmt --all -- --check
1017
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
1118

12-
buildrelease:
13-
cargo doc --lib
14-
cargo clippy -- -D warnings
15-
cargo fmt --all -- --check
16-
cargo test
19+
buildrelease: builddev
1720
make -C book/
1821
make -C release/
1922
# make -j 5 -C release/
@@ -28,3 +31,8 @@ install:
2831

2932
cov:
3033
cargo llvm-cov
34+
35+
publish: builddev
36+
cargo publish
37+
git tag -as v${version} -m "${version}"
38+
make -C csvp/ publish

csvp/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.PHONY: publish
2+
3+
publish:
4+
cargo publish

0 commit comments

Comments
 (0)