-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: dry_run release option #7
Conversation
|
||
mix_project_changes = | ||
if GitOps.Config.manage_mix_version?() do | ||
GitOps.VersionReplace.update_mix_project( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested modules could be aliased at the top of the invoking module.
|
||
readme_changes = | ||
if readme do | ||
GitOps.VersionReplace.update_readme(readme, current_version, new_version, opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested modules could be aliased at the top of the invoking module.
mix_project_module = GitOps.Config.mix_project() | ||
mix_project = mix_project_module.project() | ||
|
||
changelog_file = GitOps.Config.changelog_file() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested modules could be aliased at the top of the invoking module.
message = """ | ||
Your new version is: #{new_version}. | ||
defp create_and_display_changes(current_version, new_version, changelog_changes, opts) do | ||
changelog_file = GitOps.Config.changelog_file() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested modules could be aliased at the top of the invoking module.
Your new version is: #{new_version}. | ||
defp create_and_display_changes(current_version, new_version, changelog_changes, opts) do | ||
changelog_file = GitOps.Config.changelog_file() | ||
mix_project_module = GitOps.Config.mix_project() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested modules could be aliased at the top of the invoking module.
defp create_and_display_changes(current_version, new_version, changelog_changes, opts) do | ||
changelog_file = GitOps.Config.changelog_file() | ||
mix_project_module = GitOps.Config.mix_project() | ||
readme = GitOps.Config.manage_readme_version() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested modules could be aliased at the top of the invoking module.
|
||
mix_project_changes = | ||
if GitOps.Config.manage_mix_version?() do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested modules could be aliased at the top of the invoking module.
GitOps.VersionReplace.update_mix_project(mix_project_module, current_version, new_version) | ||
end | ||
changelog_changes = | ||
GitOps.Changelog.write( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested modules could be aliased at the top of the invoking module.
Pull Request Test Coverage Report for Build 65
💛 - Coveralls |
lib/mix/tasks/git_ops.release.ex
Outdated
@@ -98,26 +100,23 @@ defmodule Mix.Tasks.GitOps.Release do | |||
end | |||
|
|||
new_version = String.trim_leading(prefixed_new_version, prefix) | |||
IO.inspect(current_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no calls to IO.inspect/1.
lib/mix/tasks/git_ops.release.ex
Outdated
@@ -98,26 +100,23 @@ defmodule Mix.Tasks.GitOps.Release do | |||
end | |||
|
|||
new_version = String.trim_leading(prefixed_new_version, prefix) | |||
IO.inspect(current_version) | |||
IO.inspect(new_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no calls to IO.inspect/1.
Dry run option: running
mix git_ops.release [--dry_run/-d]
runs the release without writing to files. The changes to the files are displayed. If the user wants to actually write and release, they must runmix git_ops.release
and, optionallyY
for committing and tagging.Contributor checklist
For example:
fix: Multiply by appropriate coefficient
, orfeat(Calculator): Correctly preserve history
Any explanation or long form information in your commit message should be
in a separate paragraph, separated by a blank line from the primary message