-
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.
build: export repository information
The repository string is made available via the `CARGO_PKG_REPOSITORY` environment variable similar to other metadata.
- Loading branch information
Showing
3 changed files
with
8 additions
and
0 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
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
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 |
---|---|---|
|
@@ -1338,6 +1338,7 @@ fn crate_env_vars() { | |
version = "0.5.1-alpha.1" | ||
description = "This is foo" | ||
homepage = "http://example.com" | ||
repository = "http://example.com/repo.git" | ||
authors = ["[email protected]"] | ||
"#, | ||
).file( | ||
|
@@ -1354,6 +1355,7 @@ fn crate_env_vars() { | |
static CARGO_MANIFEST_DIR: &'static str = env!("CARGO_MANIFEST_DIR"); | ||
static PKG_NAME: &'static str = env!("CARGO_PKG_NAME"); | ||
static HOMEPAGE: &'static str = env!("CARGO_PKG_HOMEPAGE"); | ||
static REPOSITORY: &'static str = env!("CARGO_PKG_REPOSITORY"); | ||
static DESCRIPTION: &'static str = env!("CARGO_PKG_DESCRIPTION"); | ||
fn main() { | ||
|
@@ -1364,6 +1366,7 @@ fn crate_env_vars() { | |
println!("{}", s); | ||
assert_eq!("foo", PKG_NAME); | ||
assert_eq!("http://example.com", HOMEPAGE); | ||
assert_eq!("http://example.com/repo.git", REPOSITORY); | ||
assert_eq!("This is foo", DESCRIPTION); | ||
let s = format!("{}.{}.{}-{}", VERSION_MAJOR, | ||
VERSION_MINOR, VERSION_PATCH, VERSION_PRE); | ||
|