<commit_before>#!/usr/bin/env ruby -wKU
# encoding: utf-8

# Go to Jamoma root folder
rootfolder = "../"
Dir.chdir rootfolder
rootfolder = Dir.pwd

# Include the functions in the jamoma lib
require "#{rootfolder}/Core/Shared/jamomalib"

# Check Args
if(ARGV.length == 0)
  puts "usage: "
  puts "ruby tag.rb <required:tag-name> <optional:branch-to-tag>"
  exit 0;
end

$tag = ARGV[0];

if(ARGV.length == 2)
  $branch = ARGV[1];
else
  $branch = "default";
end

# Define function to easily tag each sub modules
def tagModule relativePathFromJamomaFolder

  if ($tag != "default")
    puts "switching #{relativePathFromJamomaFolder} to #{$tag}"
    `cd ./#{relativePathFromJamomaFolder}; git checkout #{$branch}`
  end
    
  puts "tagging #{relativePathFromJamomaFolder}"
  `cd ./#{relativePathFromJamomaFolder}; git remote prune origin`
  `cd ./#{relativePathFromJamomaFolder}; git tag #{$tag}`
  `cd ./#{relativePathFromJamomaFolder}; git push origin --tags`
end

# Tag the Jamoma repository
`git remote prune origin`
`git tag #{$tag}`
`git push origin --tags`<commit_msg>Fixing the script<commit_after>#!/usr/bin/env ruby -wKU
# encoding: utf-8

# Go to Jamoma root folder
rootfolder = "../"
Dir.chdir rootfolder
rootfolder = Dir.pwd

# Include the functions in the jamoma lib
require "#{rootfolder}/Core/Shared/jamomalib"

# Check Args
if(ARGV.length == 0)
  puts "usage: "
  puts "ruby tag.rb <required:tag-name> <optional:branch-to-tag>"
  exit 0;
end

$tag = ARGV[0];

if(ARGV.length == 2)
  $branch = ARGV[1];
else
  $branch = "default";
end

# Define function to easily tag each sub modules
def tagModule relativePathFromJamomaFolder

  if ($branch != "default")
    puts "switching #{relativePathFromJamomaFolder} to #{$branch}"
    `cd ./#{relativePathFromJamomaFolder}; git checkout #{$branch}`
  end
    
  puts "tagging #{relativePathFromJamomaFolder}"
  `cd ./#{relativePathFromJamomaFolder}; git remote prune origin`
  `cd ./#{relativePathFromJamomaFolder}; git tag #{$tag}`
  `cd ./#{relativePathFromJamomaFolder}; git push origin --tags`
end

# Tag the Jamoma repository
`git remote prune origin`
`git tag #{$tag}`
`git push origin --tags`
{'fraction_non_alphanumeric': 0.1391465677179963, 'fraction_numerical': 0.0055658627087198514, 'mean_word_length': 4.406015037593985, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3542594', 'n_tokens_mistral': 758, 'n_tokens_neox': 741, 'n_words': 219}