Skip to content

Commit

Permalink
make crate const_format invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
baoyachi committed Mar 19, 2022
1 parent e5d4d55 commit 4f92fa7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shadow-rs"
version = "0.10.1"
version = "0.11.0"
authors = ["baoyachi <[email protected]>"]
edition = "2021"
description = "A build-time information stored in your rust project"
Expand Down
12 changes: 6 additions & 6 deletions src/gen_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ macro_rules! gen_const {
}

const VERSION_BRANCH_CONST: &str = r##"#[allow(dead_code)]
pub const VERSION:&str = shadow_rs::const_format::formatcp!(r#"
pub const VERSION:&str = shadow_rs::formatcp!(r#"
pkg_version:{}
branch:{}
commit_hash:{}
Expand All @@ -16,7 +16,7 @@ build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, R
);"##;

const VERSION_TAG_CONST: &str = r##"#[allow(dead_code)]
pub const VERSION:&str = shadow_rs::const_format::formatcp!(r#"
pub const VERSION:&str = shadow_rs::formatcp!(r#"
pkg_version:{}
tag:{}
commit_hash:{}
Expand All @@ -26,7 +26,7 @@ build_env:{},{}"#,PKG_VERSION, TAG, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST

const CLAP_VERSION_BRANCH_CONST: &str = r##"#[allow(dead_code)]
#[deprecated = "Replaced with `CLAP_LONG_VERSION`"]
pub const CLAP_VERSION:&str = shadow_rs::const_format::formatcp!(r#"{}
pub const CLAP_VERSION:&str = shadow_rs::formatcp!(r#"{}
branch:{}
commit_hash:{}
build_time:{}
Expand All @@ -35,23 +35,23 @@ build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, R

const CLAP_VERSION_TAG_CONST: &str = r##"#[allow(dead_code)]
#[deprecated = "Replaced with `CLAP_LONG_VERSION`"]
pub const CLAP_VERSION:&str = shadow_rs::const_format::formatcp!(r#"{}
pub const CLAP_VERSION:&str = shadow_rs::formatcp!(r#"{}
tag:{}
commit_hash:{}
build_time:{}
build_env:{},{}"#,PKG_VERSION, TAG, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
);"##;

const CLAP_LONG_VERSION_BRANCH_CONST: &str = r##"#[allow(dead_code)]
pub const CLAP_LONG_VERSION:&str = shadow_rs::const_format::formatcp!(r#"{}
pub const CLAP_LONG_VERSION:&str = shadow_rs::formatcp!(r#"{}
branch:{}
commit_hash:{}
build_time:{}
build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
);"##;

const CLAP_LONG_VERSION_TAG_CONST: &str = r##"#[allow(dead_code)]
pub const CLAP_LONG_VERSION:&str = shadow_rs::const_format::formatcp!(r#"{}
pub const CLAP_LONG_VERSION:&str = shadow_rs::formatcp!(r#"{}
tag:{}
commit_hash:{}
build_time:{}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
//! For the user guide and futher documentation, please read
//! [The shadow-rs document](https://github.com/baoyachi/shadow-rs).
//!
pub extern crate const_format;
mod build;
mod ci;
Expand All @@ -167,6 +166,7 @@ use env::*;

use git::*;

pub use const_format::*;
use crate::ci::CiType;
use crate::time::BuildTime;
use std::collections::HashMap;
Expand Down

0 comments on commit 4f92fa7

Please sign in to comment.