Skip to content

Commit

Permalink
chore: GitContext long hash & idiomatic Options (#233)
Browse files Browse the repository at this point in the history
* chore: GitContext long hash & idiomatic Options

* chore: adds regression tests for GitContext

* fix: use git2 to construct GitContext
  • Loading branch information
EverlastingBugstopper authored Feb 4, 2021
1 parent 211cfac commit 23434de
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 111 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build:
[
linux-stable,
macos-stable,
windows-stable,
]
build: [linux-stable, macos-stable, windows-stable]
include:
- build: linux-stable
os: ubuntu-latest
Expand Down
76 changes: 72 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ timber = { path = "./crates/timber" }
anyhow = "1.0.38"
atty = "0.2.14"
ansi_term = "0.12.1"
chrono = "0.4"
console = "0.14.0"
git2 = "0.13.17"
git-url-parse = "0.3.1"
heck = "0.3.2"
prettytable-rs = "0.8.0"
serde = "1.0"
Expand All @@ -28,13 +31,11 @@ structopt = "0.3.21"
tracing = "0.1.22"
regex = "1"
url = "2.2.0"
git_info = "0.1.2"
git-url-parse = "0.3.1"
chrono = "0.4"

[dev-dependencies]
assert_cmd = "1.0.1"
assert_fs = "1.0.0"
rustversion = "1.0.4"
serial_test = "0.5.0"
predicates = "1.0.5"

Expand Down
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl Rover {

pub(crate) fn get_git_context(&self) -> Result<GitContext> {
// constructing GitContext with a set of overrides from env vars
let git_context = GitContext::with_env(&self.env_store)?;
let git_context = GitContext::try_from_rover_env(&self.env_store)?;
tracing::debug!(?git_context);
Ok(git_context)
}
Expand Down
Loading

0 comments on commit 23434de

Please sign in to comment.