From c81248075d046f5cec3eced786b5bff312559716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Tue, 17 Sep 2024 09:18:05 +0200 Subject: [PATCH] Fix Rakefile regression (as -> AS) introduced in #59 --- Rakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 4569d1e..38c7b73 100644 --- a/Rakefile +++ b/Rakefile @@ -2,7 +2,8 @@ task :get_image_version do dockerfile_content = IO.read("transport-site/Dockerfile") version = dockerfile_content[/FROM (hexpm\/elixir.*)/, 1] version = version.gsub('hexpm/elixir:','elixir-') - tools_version = dockerfile_content[/transport-tools:v(\d+\.\d+\.\d+) as transport-tools/, 1] - fail "Unexpected FROM value (got #{version}), script must be adapted?" unless version =~ /\Aelixir\-[^\-]+\-erlang\-[^\-]+\-ubuntu\-focal\-[^\-]+\z/ + tools_version = dockerfile_content[/transport-tools:v(\d+\.\d+\.\d+) as transport-tools/i, 1] + fail "Unexpected FROM value (got #{version.inspect}), script must be adapted?" unless version =~ /\Aelixir\-[^\-]+\-erlang\-[^\-]+\-ubuntu\-focal\-[^\-]+\z/ + fail "Unexpected tools_version value (got #{tools_version.inspect}), script must be adapted?" unless tools_version =~ /\A\d\.\d\.\d\z/ puts version + "-transport-tools-" + tools_version end