Skip to content

Commit 02affbd

Browse files
committed
add release command
1 parent c283411 commit 02affbd

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "loki-cli"
3-
version = "1.6.0"
3+
version = "1.7.0"
44
authors = ["Kyle W. Rader"]
55
description = "Loki: 🚀 A Git productivity tool"
66
homepage = "https://github.com/kyle-rader/loki-cli"

src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ enum Cli {
154154
#[clap(subcommand)]
155155
command: RepoSubcommand,
156156
},
157+
158+
/// Push the main branch to the release branch.
159+
#[clap(visible_alias = "r")]
160+
Release,
157161
}
158162

159163
const LOKI_NEW_PREFIX: &str = "LOKI_NEW_PREFIX";
@@ -173,9 +177,15 @@ fn main() -> Result<(), String> {
173177
Cli::Repo {
174178
command: RepoSubcommand::Stats(options),
175179
} => repo_stats(options),
180+
Cli::Release => release(),
176181
}
177182
}
178183

184+
fn release() -> Result<(), String> {
185+
git_command_status("push main to release", vec!["push", "origin", "main:release"])?;
186+
Ok(())
187+
}
188+
179189
fn no_hooks(command: &[impl AsRef<str>]) -> Result<(), String> {
180190
if command.is_empty() {
181191
return Err(String::from("command cannot be empty."));

0 commit comments

Comments
 (0)