-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Acted on making deployment a dependency of base to verify it was chec…
…ked out correctly
- Loading branch information
1 parent
ca756fb
commit 4cae394
Showing
1 changed file
with
25 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -936,6 +936,7 @@ fn dep_with_submodule() { | |
"\ | ||
[UPDATING] git repository [..] | ||
[UPDATING] git submodule `file://[..]/deployment` | ||
[COMPILING] deployment [..] | ||
[COMPILING] base [..] | ||
[COMPILING] foo [..] | ||
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]\n", | ||
|
@@ -946,17 +947,36 @@ fn dep_with_submodule() { | |
#[cargo_test] | ||
fn dep_with_relative_submodule() { | ||
let foo = project(); | ||
let base = git::new("base/base", |project| { | ||
let base = git::new("base", |project| { | ||
project | ||
.file("Cargo.toml", &basic_lib_manifest("base")) | ||
.file("src/lib.rs", "pub fn dep() {}") | ||
.file( | ||
"Cargo.toml", | ||
r#" | ||
[package] | ||
name = "base" | ||
version = "0.5.0" | ||
[dependencies] | ||
deployment.path = "deployment" | ||
"#, | ||
) | ||
.file( | ||
"src/lib.rs", | ||
r#" | ||
pub fn dep() { | ||
deployment::deployment_func(); | ||
} | ||
"#, | ||
) | ||
}); | ||
let _deployment = git::new("deployment", |project| { | ||
project.file("src/lib.rs", "pub fn dep() {}") | ||
project | ||
.file("src/lib.rs", "pub fn deployment_func() {}") | ||
.file("Cargo.toml", &basic_lib_manifest("deployment")) | ||
}); | ||
|
||
let base_repo = git2::Repository::open(&base.root()).unwrap(); | ||
git::add_submodule(&base_repo, "../../deployment", Path::new("deployment")); | ||
git::add_submodule(&base_repo, "../deployment", Path::new("deployment")); | ||
git::commit(&base_repo); | ||
|
||
let project = foo | ||
|
@@ -965,13 +985,10 @@ fn dep_with_relative_submodule() { | |
&format!( | ||
r#" | ||
[project] | ||
name = "foo" | ||
version = "0.5.0" | ||
authors = ["[email protected]"] | ||
[dependencies.base] | ||
git = '{}' | ||
"#, | ||
base.url() | ||
|