GitOps.VersionReplace (Git Ops v2.11.0)

View Source

Functions that handle the logic behind replacing the version in related files.

Summary

Functions

render(arg, contents, current_version, new_version)

@spec render(
  {String.t(), (String.t() -> String.t()), (String.t() -> String.t())},
  String.t(),
  String.t(),
  String.t()
) :: {:ok, String.t()} | {:error, :bad_replace}

The updated contents of a managed file, without touching the filesystem.

update_managed_file(managed_file, current_version, new_version, opts \\ [])

@spec update_managed_file(
  {String.t(), (String.t() -> String.t()), (String.t() -> String.t())},
  String.t(),
  String.t(),
  keyword()
) :: String.t() | {:error, :bad_replace}