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

chore: configure release flow #5

Merged
merged 2 commits into from Nov 28, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions Cargo.toml
Expand Up @@ -9,11 +9,14 @@ repository = "https://github.com/yuhr/fncmd"
categories = ["command-line-interface"]
keywords = ["cli", "macro", "clap"]
edition = "2021"
exclude = [".*", "rust-toolchain", "rustfmt.toml"]
exclude = [".*", "rust-toolchain", "rustfmt.toml", "release.toml"]

[dependencies]
clap = "3.0.0-beta.5"
fncmd-impl = { path = "impl", version = "1.0.0" }

[workspace]
members = ["impl"]
members = ["impl"]

[dev-dependencies]
git_hooks = "0.1.3"
6 changes: 6 additions & 0 deletions hooks/pre-commit
@@ -0,0 +1,6 @@
#!/bin/sh

for FILE in `git diff --cached --name-only`; do
perl -pi -e 'chomp if eof' $FILE
git add $FILE
done
6 changes: 2 additions & 4 deletions impl/Cargo.toml
Expand Up @@ -6,6 +6,7 @@ authors = ["Yu Shimura <mail@yuhr.org>"]
description = "This crate shouldn't be used directly. Check fncmd."
repository = "https://github.com/yuhr/fncmd"
edition = "2021"
exclude = ["release.toml"]

[lib]
proc-macro = true
Expand All @@ -17,7 +18,4 @@ darling = "0.13.0"
proc-macro-error = "1.0.4"
proc-macro2 = "1.0.32"
quote = "1.0.10"
syn = { version = "1.0.81", features = ["full", "extra-traits", "visit"] }

[package.metadata.release]
tag = false
syn = { version = "1.0.81", features = ["full", "extra-traits", "visit"] }
2 changes: 2 additions & 0 deletions impl/release.toml
@@ -0,0 +1,2 @@
tag = false
pre-release-replacements = []
8 changes: 8 additions & 0 deletions justfile
@@ -0,0 +1,8 @@
@_:
just --list

bump *ARGS:
cargo release --workspace --no-tag --no-push --no-publish {{ARGS}}

release *ARGS:
cargo release --workspace --sign-tag {{ARGS}}
7 changes: 7 additions & 0 deletions release.toml
@@ -0,0 +1,7 @@
pre-release-replacements = [
{ file = "README.md", search = "fncmd = \".+\"", replace = "{{crate_name}} = \"{{version}}\"" },
{ file = "Cargo.toml", search = "fncmd-impl = \\{ path = \"impl\", version = \".+\" \\}", replace = "fncmd-impl = { path = \"impl\", version = \"{{version}}\" }" },
]
pre-release-commit-message = "chore: bump version to {{version}}"
consolidate-commits = true
shared-version = true