Skip to content
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

Merged
merged 11 commits into from
Nov 28, 2018
Merged

Conversation

tomplarge
Copy link
Contributor

@tomplarge tomplarge commented Nov 20, 2018

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 run mix git_ops.release and, optionally Y for committing and tagging.

Contributor checklist

  • My commit messages follow the Conventional Commit Message Format
    For example: fix: Multiply by appropriate coefficient, or
    feat(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
  • Bug fixes include regression tests
  • Features include unit/acceptance tests


mix_project_changes =
if GitOps.Config.manage_mix_version?() do
GitOps.VersionReplace.update_mix_project(

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)

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()

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()

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()

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()

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

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(

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.

@coveralls
Copy link

coveralls commented Nov 20, 2018

Pull Request Test Coverage Report for Build 65

  • 25 of 28 (89.29%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+26.3%) to 86.631%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/mix/tasks/git_ops.release.ex 16 19 84.21%
Totals Coverage Status
Change from base Build 54: 26.3%
Covered Lines: 162
Relevant Lines: 187

💛 - Coveralls

@@ -98,26 +100,23 @@ defmodule Mix.Tasks.GitOps.Release do
end

new_version = String.trim_leading(prefixed_new_version, prefix)
IO.inspect(current_version)

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.

@@ -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)

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.

@zachdaniel zachdaniel merged commit 34cbb2e into zachdaniel:master Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants