From de67444ee0858c70b071ccda0d89ce484f740525 Mon Sep 17 00:00:00 2001 From: DustInDark <2350416+hitenkoku@users.noreply.github.com> Date: Wed, 3 May 2023 22:43:41 +0900 Subject: [PATCH 1/4] docs(CHANGELOG): updated changelog #1028 --- CHANGELOG-Japanese.md | 1 + CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG-Japanese.md b/CHANGELOG-Japanese.md index 71d816cd5..56ebafb78 100644 --- a/CHANGELOG-Japanese.md +++ b/CHANGELOG-Japanese.md @@ -11,6 +11,7 @@ - `search`コマンドに`-M, --multiline`オプションを追加した。 (#1017) (@hitenkoku) - `search`コマンドの出力での不要な改行やタブを削除した。 (#1003) (@hitenkoku) - 正規表現の不要なエスケープを許容し、パースエラーを減らす`regex`クレートを1.8に更新した。(#1018) (@YamatoSecurity) +- `update-rules`コマンド使用時にハヤブサのバージョン番号の詳細を確認するようにした (#1028) (@hitenkoku) **バグ修正:** diff --git a/CHANGELOG.md b/CHANGELOG.md index b20742602..d4b1956e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Added `-M, --multiline` option to search command. (#1017) (@hitenkoku) - Deleted return characters in the output of the `search` command. (#1003) (@hitenkoku) - `regex` crate updated to 1.8 which allows unnecessary escapes in regular expressions reducing parsing errors. (#1018) (@YamatoSecurity) +- Changed check details of hayabusa version number when `update-rules` command is used (#1028) (@hitenkoku) **Bug Fixes:** From 8ba20fc2f4b2e411caa32d7ecac031d3c4fb9c7d Mon Sep 17 00:00:00 2001 From: DustInDark <2350416+hitenkoku@users.noreply.github.com> Date: Wed, 3 May 2023 23:00:09 +0900 Subject: [PATCH 2/4] feat(main): changed check details of hayabusa version number when update-rules command is used #1028 feat(main): changed check details of hayabusa version number when update-rules command is used #1028 --- src/main.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index bee9bffea..bc29e5058 100644 --- a/src/main.rs +++ b/src/main.rs @@ -465,13 +465,13 @@ impl App { } } println!(); - if latest_version_data.is_some() - && now_version - != &latest_version_data - .as_ref() - .unwrap_or(now_version) - .replace('\"', "") - { + let split_now_version = &now_version + .replace("-dev", "") + .split('.') + .filter_map(|x| x.parse().ok()).collect::>(); + let split_latest_version = &latest_version_data.as_ref().unwrap_or(now_version).replace('"', "").split('.'). + filter_map(|x| x.parse().ok()).collect::>(); + if split_latest_version > split_now_version { write_color_buffer( &BufferWriter::stdout(ColorChoice::Always), None, @@ -491,7 +491,6 @@ impl App { .ok(); println!(); } - return; } Action::LevelTuning(option) => { From 2c7110b988678e475daf25c4c8acc86d6551f81e Mon Sep 17 00:00:00 2001 From: DustInDark <2350416+hitenkoku@users.noreply.github.com> Date: Wed, 3 May 2023 23:17:57 +0900 Subject: [PATCH 3/4] style: cargo fmt --- src/main.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index bc29e5058..6961b7ade 100644 --- a/src/main.rs +++ b/src/main.rs @@ -468,9 +468,15 @@ impl App { let split_now_version = &now_version .replace("-dev", "") .split('.') - .filter_map(|x| x.parse().ok()).collect::>(); - let split_latest_version = &latest_version_data.as_ref().unwrap_or(now_version).replace('"', "").split('.'). - filter_map(|x| x.parse().ok()).collect::>(); + .filter_map(|x| x.parse().ok()) + .collect::>(); + let split_latest_version = &latest_version_data + .as_ref() + .unwrap_or(now_version) + .replace('"', "") + .split('.') + .filter_map(|x| x.parse().ok()) + .collect::>(); if split_latest_version > split_now_version { write_color_buffer( &BufferWriter::stdout(ColorChoice::Always), From bf1d2b69e85673f325961c9140d9e13e5a1f0fde Mon Sep 17 00:00:00 2001 From: Yamato Security <71482215+YamatoSecurity@users.noreply.github.com> Date: Thu, 4 May 2023 06:23:27 +0900 Subject: [PATCH 4/4] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4b1956e7..0baa93c82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ - Added `-M, --multiline` option to search command. (#1017) (@hitenkoku) - Deleted return characters in the output of the `search` command. (#1003) (@hitenkoku) - `regex` crate updated to 1.8 which allows unnecessary escapes in regular expressions reducing parsing errors. (#1018) (@YamatoSecurity) -- Changed check details of hayabusa version number when `update-rules` command is used (#1028) (@hitenkoku) +- Don't show new version information with the `update-rules` command when building a newer dev build. (#1028) (@hitenkoku) **Bug Fixes:**