<commit_before>namespace :release do
  task :bump, [:type] do |_, arguments|
    system "bin/semver increment #{arguments[:type]}"
  end

  task commit: :environment do
    system "git commit -am '#{Brotherly.version}'"
  end

  task :tag do
    system 'git tag $(bin/semver tag)'
  end

  task :push do
    system 'git push && git push --tags'
  end
end

desc 'Deploy and release a new version of this application'
task :release, [:type] => [
  'release:bump', 'release:commit', 'release:tag', 'release:push'
]<commit_msg>Add additional deploy tasks to mask rake attrs handling<commit_after>namespace :release do
  task :bump, [:level] do |_, arguments|
    level = arguments[:level] || 'patch'
    system "bin/semver increment #{level}"
  end

  task commit: :environment do
    system "git commit -am '#{Brotherly.version}'"
  end

  task :tag do
    system 'git tag $(bin/semver tag)'
  end

  task :push do
    system 'git push && git push --tags'
  end

  [:major, :minor, :patch, :special].each do |level|
    desc "Deploy and release a new #{level} version to brother.ly"
    task level do
      Rake::Task[:release].invoke level
    end
  end
end

# Deploy and release a new version of this application
task :release, [:level] => [
  'release:bump', 'release:commit', 'release:tag', 'release:push'
]
{'fraction_non_alphanumeric': 0.13149847094801223, 'fraction_numerical': 0.0, 'mean_word_length': 3.625441696113074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1840008', 'n_tokens_mistral': 425, 'n_tokens_neox': 414, 'n_words': 153}