Sha256: f934452daefd2426df40601bc774307356c515034587e265a271bde7c72003cd

Contents?: true

Size: 800 Bytes

Versions: 1

Compression:

Stored size: 800 Bytes

Contents

# frozen_string_literal: true

desc "Generate a Changelog"
task :changelog do
  # rubocop:disable Style/MutableConstant
  CHANGELOG_CMD ||= %w[
    github_changelog_generator
    -u
    mhenrixon
    -p
    stub_requests
    --no-verbose
    --token
  ]
  CHECKOUT_CHANGELOG_CMD ||= "git checkout -B update-changelog"
  COMMIT_CHANGELOG_CMD   ||= "git add --all"
  COMMIT_CHANGELOG_CMD   ||= "git commit -a -m 'Update changelog'"
  GIT_PUSH_CMD           ||= "git push -u origin update-changelog"
  OPEN_PR_CMD            ||= "hub pull-request -b master  -m 'Update Changelog' -a mhenrixon -l changelog"
  # rubocop:enable Style/MutableConstant

  sh(*CHANGELOG_CMD.push(ENV["CHANGELOG_GITHUB_TOKEN"]))
  sh(CHECKOUT_CHANGELOG_CMD)
  sh(COMMIT_CHANGELOG_CMD)
  sh(GIT_PUSH_CMD)
  sh(OPEN_PR_CMD)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stub_requests-0.1.3 lib/tasks/changelog.rake