[why] We need to use specified version of performance tool to test. But the tool package uses latest.cgz by default.
[how] Job yaml: ${program}_version: 1.0-19 About ${program}_version's value, it is from PKGBUILD file's $pkgver-$pkgrel.
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 + deps_dest_file = "#{SRV_INITRD}/deps/#{mount_type}/#{os_dir}/#{program}/#{program}.cgz" - pkg_dest_file = "#{SRV_INITRD}/pkg/#{mount_type}/#{os_dir}/#{program}/latest.cgz" + pkg_dest_file = "#{SRV_INITRD}/pkg/#{mount_type}/#{os_dir}/#{program}/#{program_version}.cgz"
if File.exists?(deps_dest_file) initrd_deps_arr << "#{initrd_http_prefix}" + JobHelper.service_path(deps_dest_file)