mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
refactor(oxfmt,oxlint): replace OXC_VERSION with env!("CARGO_PKG_VERSION") (#17458)
I didn't know this env variable existed when I built the first version of the CLI :-)
This commit is contained in:
4 files changed
+2
-11
No files matched your search
@@ -86,7 +86,6 @@ jobs:
|
||||
name: Build Oxlint ${{ matrix.code-target }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
OXC_VERSION: ${{ needs.check.outputs.oxlint_version }} # Required for `--version` to work.
|
||||
TARGET_CC: clang # for mimalloc
|
||||
defaults:
|
||||
run:
|
||||
@@ -253,7 +252,6 @@ jobs:
|
||||
name: Build Oxfmt ${{ matrix.code-target }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
OXC_VERSION: ${{ needs.check.outputs.oxfmt_version }} # Required for `--version` to work.
|
||||
TARGET_CC: clang # for mimalloc
|
||||
defaults:
|
||||
run:
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
passthrough = [
|
||||
"CI", # for crates/oxc_traverse/build.rs
|
||||
"JEMALLOC_SYS_WITH_LG_PAGE",
|
||||
"OXC_VERSION",
|
||||
]
|
||||
@@ -4,10 +4,7 @@ use bpaf::{Bpaf, Parser};
|
||||
#[cfg(feature = "napi")]
|
||||
use cow_utils::CowUtils;
|
||||
|
||||
const VERSION: &str = match option_env!("OXC_VERSION") {
|
||||
Some(v) => v,
|
||||
None => "dev",
|
||||
};
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
#[expect(clippy::ptr_arg)]
|
||||
fn validate_paths(paths: &Vec<PathBuf>) -> bool {
|
||||
|
||||
@@ -10,10 +10,7 @@ pub use self::{
|
||||
lint::{LintCommand, OutputOptions, ReportUnusedDirectives, WarningOptions, lint_command},
|
||||
};
|
||||
|
||||
const VERSION: &str = match option_env!("OXC_VERSION") {
|
||||
Some(v) => v,
|
||||
None => "dev",
|
||||
};
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
/// Miscellaneous
|
||||
#[derive(Debug, Clone, Bpaf)]
|
||||
|
||||
Reference in new issue
Block a user