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

feat: git source with host git #269

Merged
merged 10 commits into from
Nov 14, 2023
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
97 changes: 31 additions & 66 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ readme = "README.md"
default = ['native-tls']
native-tls = ['reqwest/native-tls', 'rattler/native-tls']
rustls-tls = ['reqwest/rustls-tls', 'rattler/rustls-tls']
git = ['dep:git2']

[dependencies]
serde = { version = "1.0.190", features = ["derive"] }
Expand Down Expand Up @@ -75,17 +74,18 @@ tempfile = "3.8.1"
chrono = "0.4.31"
sha1 = "0.10.6"
spdx = "0.10.2"
git2 = { version = "0.18.1", features = ["vendored-openssl"], optional = true }
fs_extra = "1.3.0"
ignore = "0.4.20"
globset = "0.4.13"
tracing-indicatif = "0.3.5"
clap-verbosity-flag = "2.1.0"
tracing-core = "0.1.32"
dunce = "1.0.4"

[dev-dependencies]
insta = { version = "1.34.0", features = ["yaml"] }
rstest = "0.18.2"
tracing-test = "0.2.4"

[profile.dev.package."*"]
opt-level = 3
Expand Down
14 changes: 14 additions & 0 deletions rust-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,18 @@ mod tests {
assert_eq!(std::fs::read_to_string(installer).unwrap().trim(), "conda");
check_info(pkg, recipes().join("toml/expected"));
}

#[test]
fn test_git_source() {
let tmp = tmp();
let rattler_build =
rattler().build::<_, _, &str>(recipes().join("llamacpp"), tmp.as_dir(), None);
assert!(rattler_build.is_ok());
let pkg = get_extracted_package(tmp.as_dir(), "llama.cpp");
// this is to ensure that the clone happens correctly
let license = pkg.join("info/licenses/LICENSE");
assert!(license.exists());
let src = std::fs::read_to_string(license).unwrap();
assert!(src.contains(" Georgi "));
}
}
Loading
Loading