From 038e9659ff05f31e41f4f38a405a8522005e97d5 Mon Sep 17 00:00:00 2001 From: jgstew Date: Fri, 7 Jun 2024 11:58:34 -0400 Subject: [PATCH] add build time --- .../KasperskyVirusRemovalTool-Win-Run.bes.mustache | 2 +- ...asperskyVirusRemovalTool-Win.bigfix.recipe.yaml | 5 +++++ ...perskyVirusRemovalTool-Win.download.recipe.yaml | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Kaspersky/KasperskyVirusRemovalTool-Win-Run.bes.mustache b/Kaspersky/KasperskyVirusRemovalTool-Win-Run.bes.mustache index 37a92bf..ca21397 100644 --- a/Kaspersky/KasperskyVirusRemovalTool-Win-Run.bes.mustache +++ b/Kaspersky/KasperskyVirusRemovalTool-Win-Run.bes.mustache @@ -1,7 +1,7 @@ <{{TypeTaskOrFixlet}}{{^TypeTaskOrFixlet}}Task{{/TypeTaskOrFixlet}}> - Run: {{DisplayName}} v{{version}} - Windows + Run: {{DisplayName}} v{{version}} {{build_time}} - Windows diff --git a/Kaspersky/KasperskyVirusRemovalTool-Win.bigfix.recipe.yaml b/Kaspersky/KasperskyVirusRemovalTool-Win.bigfix.recipe.yaml index 1bbd5c4..c52b53e 100644 --- a/Kaspersky/KasperskyVirusRemovalTool-Win.bigfix.recipe.yaml +++ b/Kaspersky/KasperskyVirusRemovalTool-Win.bigfix.recipe.yaml @@ -15,6 +15,11 @@ Process: - Processor: com.github.jgstew.SharedProcessors/TemplateDictionaryAppendInput + - Processor: com.github.jgstew.SharedProcessors/TemplateDictionaryAppend + Arguments: + append_key: "build_time" + append_value: "%build_time%" + - Processor: com.github.jgstew.SharedProcessors/ContentFromTemplate Arguments: # use UNIX style paths so this works on Windows and non-Windows: diff --git a/Kaspersky/KasperskyVirusRemovalTool-Win.download.recipe.yaml b/Kaspersky/KasperskyVirusRemovalTool-Win.download.recipe.yaml index afded68..6352a2b 100644 --- a/Kaspersky/KasperskyVirusRemovalTool-Win.download.recipe.yaml +++ b/Kaspersky/KasperskyVirusRemovalTool-Win.download.recipe.yaml @@ -25,3 +25,17 @@ Process: Arguments: input_string: "%version%" re_pattern: '^\d+\.\d+' + + # validate file signature and get signature date as SourceReleaseDate: + - Processor: com.github.jgstew.SharedProcessors/FileExeVerifySignature + + # verify SourceReleaseDate is set correctly: + - Processor: com.github.jgstew.SharedProcessors/TextSearcher + Arguments: + input_string: "%SourceReleaseDate%" + re_pattern: '^20\d{2}-[0-1]\d{1}-[0-3]\d{1}$' + + - Processor: com.github.jgstew.SharedProcessors/TextSearcher + Arguments: + input_string: "%file_signature_datetime%" + re_pattern: '(?P.+)\+'