<commit_before>def update_version(path)
	version = `git describe --tags --dirty`.chomp
	version.gsub!(/-([a-z0-9]+(-dirty)?)$/) { |m| "(#{$1})" }

	begin
		return if version == open(path).read.chomp
	rescue
	end

	open(path, 'w') { |f| f.puts version }
end

update_version 'VERSION'<commit_msg>gitリポジトリから version が取得できないときは VERSION ファイルを上書きしないようにした<commit_after>def update_version(path)
	version = `git describe --tags --dirty`.chomp
	version.gsub!(/-([a-z0-9]+(-dirty)?)$/) { |m| "(#{$1})" }

	begin
		return if version == open(path).read.chomp
		return if version.empty?
	rescue
	end

	open(path, 'w') { |f| f.puts version }
end

update_version 'VERSION'
{'fraction_non_alphanumeric': 0.19207317073170732, 'fraction_numerical': 0.009146341463414634, 'mean_word_length': 4.341463414634147, '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': '5366371', 'n_tokens_mistral': 284, 'n_tokens_neox': 268, 'n_words': 56}