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: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ghpool"
version = "0.3.1"
version = "0.3.2"
edition = "2021"
description = "Internal GitHub API proxy with PAT pooling and caching"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion ghp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ghp"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "gh CLI shim that routes read commands through ghpool"

Expand Down
8 changes: 8 additions & 0 deletions ghp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ fn main() {
let ghpool_url = env::var("GHPOOL_URL")
.unwrap_or_else(|_| "http://ghpool.openab.local:8080".to_string());

// Handle version
if args.first().map(|s| s.as_str()) == Some("version") || args.first().map(|s| s.as_str()) == Some("--version") {
println!("ghp version {}", env!("CARGO_PKG_VERSION"));
let gh = find_real_gh();
let _ = Command::new(&gh).arg("--version").status();
exit(0);
}

// Try to handle as a pooled read via ghpool REST
if let Some(code) = try_pooled(&args, &ghpool_url) {
exit(code);
Expand Down