Skip to content

Commit

Permalink
Add a Ruby task to easily generate our image name
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar committed Apr 9, 2021
1 parent 94aed54 commit 34de8f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
task :get_image_version do
version = IO.read("transport-site/Dockerfile")[/FROM (hexpm\/elixir.*)/, 1]
version = version.gsub('hexpm/elixir:','elixir-')
fail "Unexpected FROM format, script must be verified" unless version =~ /\Aelixir\-[^\-]+\-erlang\-[^\-]+\-alpine\-[^\-]+\z/
puts version
end

0 comments on commit 34de8f1

Please sign in to comment.