Skip to content

Commit

Permalink
Correctif régression Rakefile regression (as -> AS)
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar authored Sep 17, 2024
1 parent 837a440 commit 7626bd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7626bd0

Please sign in to comment.