Skip to content

Commit

Permalink
Update version.
Browse files Browse the repository at this point in the history
Do not hardcore a SHA.
  • Loading branch information
LukeMathWalker committed Jan 16, 2024
1 parent f3c64d4 commit a7fcf04
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 27 deletions.
24 changes: 12 additions & 12 deletions libs/Cargo.lock

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

2 changes: 1 addition & 1 deletion libs/pavex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavex"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
repository = "https://github.com/LukeMathWalker/pavex"

Expand Down
2 changes: 1 addition & 1 deletion libs/pavex_bp_schema/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavex_bp_schema"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/pavex_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavex_cli"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[[bin]]
Expand Down
10 changes: 10 additions & 0 deletions libs/pavex_cli/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ pub fn tty_width() -> Option<usize> {
.ok()
.and_then(|s| s.parse().ok())
}

/// The SHA of the commit that `pavex_cli` was built from.
pub const fn commit_sha() -> &'static str {
env!("VERGEN_GIT_SHA")
}

/// The version of `pavex_cli` that is being used.
pub const fn version() -> &'static str {
env!("CARGO_PKG_VERSION")
}
7 changes: 6 additions & 1 deletion libs/pavex_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ struct Cli {
}

// Same structure used by `cargo --version`.
static VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), " (", env!("VERGEN_GIT_SHA"), ")");
static VERSION: &str = concat!(
pavex_cli::env::version(),
" (",
pavex_cli::env::commit_sha(),
")"
);

#[derive(Copy, Clone, Debug)]
enum Color {
Expand Down
2 changes: 1 addition & 1 deletion libs/pavex_cli/src/pavexc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn get_or_install_from_version(
locator: &PavexLocator,
version: &Version,
) -> Result<PathBuf, anyhow::Error> {
let revision_sha = "b32592e21e753529ae7abd14c1829fa99bca150b";
let revision_sha = crate::env::commit_sha();
let pavexc_path = locator
.toolchains()
.git()
Expand Down
3 changes: 2 additions & 1 deletion libs/pavex_cli/src/state.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::env::version;
use crate::locator::PavexLocator;
use anyhow::Context;
use cargo_like_utils::flock::{FileLock, Filesystem};
Expand Down Expand Up @@ -37,7 +38,7 @@ impl State {
Some(current_state) => Ok(current_state.toolchain),
None => {
// We default to the toolchain that matches the current version of the CLI.
let cli_version = semver::Version::parse(env!("CARGO_PKG_VERSION"))
let cli_version = semver::Version::parse(version())
.context("Failed to parse the current version of the CLI.")?;
Ok(cli_version)
}
Expand Down
2 changes: 1 addition & 1 deletion libs/pavex_cli_client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavex_cli_client"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/pavex_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavex_macros"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion libs/pavex_miette/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavex_miette"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/pavex_reflection/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavex_reflection"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/pavex_test_runner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavex_test_runner"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[package.metadata.dist]
Expand Down
2 changes: 1 addition & 1 deletion libs/pavexc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavexc"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/pavexc_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavexc_cli"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion libs/pavexc_cli_client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pavexc_cli_client"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion libs/persist_if_changed/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "persist_if_changed"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

[dependencies]
Expand Down

0 comments on commit a7fcf04

Please sign in to comment.