<commit_before>#!/usr/bin/env ruby

raise "Missing GITHUB_RELEASE_ACCESS_TOKEN" unless ENV['GITHUB_RELEASE_ACCESS_TOKEN']

# Find out the current version of the agent
root_dir = File.expand_path(File.join(File.expand_path(File.dirname(__FILE__)), '..'))
version_file = File.read(File.join(root_dir, 'buildbox', 'version.go'))
version_number = version_file.match(/Version = "(.+)"/)[1]
version = "v#{version_number}"

# Is it prerelease?
prerelease = !!(version =~ /beta|alpha/)

# Collect the files that need to be uploaded
files = Dir[File.join(root_dir, "pkg", "*.tar.gz")]

# Output information
puts "Version: #{version}"
puts "Prerelease: #{prerelease ? "Yes" : "No"}"
puts "Assets:"
files.each do |file|
  puts " - #{File.basename(file)}"
end<commit_msg>Fixed the publish release script for windows.<commit_after>#!/usr/bin/env ruby

raise "Missing GITHUB_RELEASE_ACCESS_TOKEN" unless ENV['GITHUB_RELEASE_ACCESS_TOKEN']

# Find out the current version of the agent
root_dir = File.expand_path(File.join(File.expand_path(File.dirname(__FILE__)), '..'))
version_file = File.read(File.join(root_dir, 'buildbox', 'version.go'))
version_number = version_file.match(/Version = "(.+)"/)[1]
version = "v#{version_number}"

# Is it prerelease?
prerelease = !!(version =~ /beta|alpha/)

# Collect the files that need to be uploaded
files = Dir[File.join(root_dir, "pkg", "*.{tar.gz,zip}")]

# Output information
puts "Version: #{version}"
puts "Prerelease: #{prerelease ? "Yes" : "No"}"
puts "Assets:"
files.each do |file|
  puts " - #{File.basename(file)}"
end
{'fraction_non_alphanumeric': 0.16966580976863754, 'fraction_numerical': 0.0012853470437017994, 'mean_word_length': 5.889380530973451, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2457810', 'n_tokens_mistral': 555, 'n_tokens_neox': 542, 'n_words': 129}