
On Tue, Nov 10, 2020 at 06:33:07PM +0800, Zhang Yu wrote:
[why] Now we are required to use specified version of performance tool to test. But the tool package used is latest.cgz by default.
[how] job yaml: ${program}_version: 1.0-17
Signed-off-by: Zhang Yu <2134782174@qq.com> --- src/lib/job.cr | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 07873ab..d10a1e9 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -424,8 +424,14 @@ class Job program = $1 end
+ if @hash["#{program}_version"]? + program_version = @hash["#{program}_version"] + else + program_version = "latest" + end +
The "#{program}_version" is used more than once, so you can define a var instead of directly using, that costs less. Thanks, Yuanchao