<commit_before>#This script is not really portable. It's just to automate some manual steps I usually do when releasing.
#It might evolve into someting more robust but for now it's ok for me.

import os

def run(cmd):
  print("\nRunning command: " + cmd)
  assert os.system(cmd) == 0, "\nCommand failed: " + cmd

ant_cmd = 'ant test.release release.javadoc release.maven'
raw_input("It is wise to run following command first: \n\n" + ant_cmd + "\n\nIt's because ant some times provides wrong return code.\nAny key to continue")  

run('ruby replace_headers.rb')

ok = raw_input("Make sure NOW if all you need is checked in. Proceed? (Y/N):")
if ok != "Y": 
  print "Exited on user request"
  exit(1)
  
ver = raw_input("Specify the version, e.g. 1.7:")

branch = 'https://mockito.googlecode.com/svn/branches/' + ver
run('svn copy -m "branched before release" https://mockito.googlecode.com/svn/trunk ' + branch)<commit_msg>In order to have better version in release.py<commit_after>#This script is not really portable. It's just to automate some manual steps I usually do when releasing.
#It might evolve into someting more robust but for now it's ok for me.

import os

def run(cmd):
  print("\nRunning command: " + cmd)
  assert os.system(cmd) == 0, "\nCommand failed: " + cmd

ant_cmd = 'ant test.release release.javadoc release.maven'
raw_input("It is wise to run following command first: \n\n" + ant_cmd + "\n\nIt's because ant some times provides wrong return code.\nAny key to continue")  

run('ruby replace_headers.rb')

ok = raw_input("Make sure NOW if all you need is checked in. Proceed? (Y/N):")
if ok != "Y": 
  print "Exited on user request"
  exit(1)
  
ver = raw_input("Specify the version, e.g. 1.9:")

branch = 'https://mockito.googlecode.com/svn/branches/' + ver
run('svn copy -m "branched before release" https://mockito.googlecode.com/svn/trunk ' + branch)
{'fraction_non_alphanumeric': 0.12300319488817892, 'fraction_numerical': 0.004259850905218318, 'mean_word_length': 4.037533512064343, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '5407943', 'n_tokens_mistral': 632, 'n_tokens_neox': 606, 'n_words': 232}