Skip to content

Commit

Permalink
Updated update version script
Browse files Browse the repository at this point in the history
  • Loading branch information
GPrimola committed Mar 2, 2024
1 parent 854bac2 commit e51ee7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/update_version.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule UpdateVersion do
@mix_exs_file "./mix.exs"
@readme_file "./README.md"
@mix_version_regex ~r/@version \"(?<version>.*)\"/
@readme_version_regex ~r/{:yamel, \"~> (?<version>.*)\"}/
@readme_version_regex ~r/{:pretty_loggex, \"~> (?<version>.*)\"}/

def update() do
with {:ok, version} <- get_version(),
Expand Down Expand Up @@ -51,7 +51,7 @@ defmodule UpdateVersion do

def update_readme(readme, version) do
IO.puts("Updating #{@readme_file}...")
readme = String.replace(readme, @readme_version_regex, "{:yamel, \"~> #{version}\"}")
readme = String.replace(readme, @readme_version_regex, "{:pretty_loggex, \"~> #{version}\"}")

case File.write!(@readme_file, readme) do
:ok ->
Expand Down

0 comments on commit e51ee7a

Please sign in to comment.