Skip to content

Commit

Permalink
Merge pull request #1030 from Yamato-Security/1028-details-check-haya…
Browse files Browse the repository at this point in the history
…busa-version

details check hayabusa version when update-rules option is used
  • Loading branch information
hitenkoku authored May 4, 2023
2 parents a188662 + bf1d2b6 commit 82e132c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-Japanese.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- `search`コマンドに`-M, --multiline`オプションを追加した。 (#1017) (@hitenkoku)
- `search`コマンドの出力での不要な改行やタブを削除した。 (#1003) (@hitenkoku)
- 正規表現の不要なエスケープを許容し、パースエラーを減らす`regex`クレートを1.8に更新した。(#1018) (@YamatoSecurity)
- `update-rules`コマンド使用時にハヤブサのバージョン番号の詳細を確認するようにした (#1028) (@hitenkoku)

**バグ修正:**

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
- Don't show new version information with the `update-rules` command when building a newer dev build. (#1028) (@hitenkoku)

**Bug Fixes:**

Expand Down
21 changes: 13 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,19 @@ 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::<Vec<i8>>();
let split_latest_version = &latest_version_data
.as_ref()
.unwrap_or(now_version)
.replace('"', "")
.split('.')
.filter_map(|x| x.parse().ok())
.collect::<Vec<i8>>();
if split_latest_version > split_now_version {
write_color_buffer(
&BufferWriter::stdout(ColorChoice::Always),
None,
Expand All @@ -491,7 +497,6 @@ impl App {
.ok();
println!();
}

return;
}
Action::LevelTuning(option) => {
Expand Down

0 comments on commit 82e132c

Please sign in to comment.