mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 13:35:42 +09:00
chore(repo): remove dead code and useless tests (#3375)
This commit is contained in:
1 parent
7e177a1c90
commit
1cd62eb661
1391 files changed
+783
-120415
No files matched your search
+2
-17
@@ -1,8 +1,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
use crate::common::{
|
||||
CALVER_SCHEME, CalverEnv, append_github_env, append_github_output, micro_segment,
|
||||
month_day_segment, parse_version_instant, resolve_calver, trim_option,
|
||||
CALVER_SCHEME, CalverEnv, append_github_output, micro_segment, month_day_segment,
|
||||
parse_version_instant, resolve_calver, trim_option,
|
||||
};
|
||||
use anyhow::Result;
|
||||
use chrono::{Datelike, Timelike, Utc};
|
||||
@@ -13,10 +13,6 @@ use std::env;
|
||||
pub struct ResolveCalverArgs {
|
||||
#[arg(long)]
|
||||
github_output: bool,
|
||||
#[arg(long)]
|
||||
github_env: bool,
|
||||
#[arg(long, default_value = "BUILD_VERSION")]
|
||||
env_name: String,
|
||||
}
|
||||
|
||||
pub fn run(args: ResolveCalverArgs) -> Result<()> {
|
||||
@@ -37,9 +33,6 @@ pub fn run(args: ResolveCalverArgs) -> Result<()> {
|
||||
("calver_scheme", CALVER_SCHEME),
|
||||
])?;
|
||||
}
|
||||
if args.github_env {
|
||||
append_github_env(&[(args.env_name.as_str(), resolved.as_str())])?;
|
||||
}
|
||||
println!("{resolved}");
|
||||
Ok(())
|
||||
}
|
||||
@@ -128,12 +121,4 @@ mod tests {
|
||||
|
||||
assert_eq!(version, "2026.109.0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn calver_rejects_invalid_time() {
|
||||
assert_eq!(
|
||||
calver_outputs("2026.520.246000").unwrap_err().to_string(),
|
||||
"Invalid build version date/time: 2026.520.246000"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user