<commit_before>#
# Generate distribution and commit it to repository
#
fs = require "fs"
path = require 'path'
mingzi = require '../../package'
  .mingzi
mkdirp = require 'mkdirp'
  .sync
rm = require './rm'
git = require './git'
cp = require './cp'

# Create distro folder
root = 'tmp/dist'
mkdirp "#{root}/#{n}" for n in ['dist', 'sis']

# Copy files
cp = cp root
cp 'README.md'
cp 'sis/junction.exe'
cp "tmp/#{mingzi}.bat", 'dist'

# Create setup.bat
fs.writeFileSync path.join(root, 'setup.bat'),
  """@"%~dp0dist/#{mingzi}.bat" : setup"""

# Git operations
commit = git.current()
rm "#{root}/.git"
git = git root
git "init"
git "remote", 'add', 'origin', '../..'
git "checkout", '-b', 'dist'
git "add", "."
git 'commit', '-m', commit
git 'push', 'origin', 'dist', '--force'<commit_msg>Force add .exe to distro<commit_after>#
# Generate distribution and commit it to repository
#
fs = require "fs"
path = require 'path'
mingzi = require '../../package'
  .mingzi
mkdirp = require 'mkdirp'
  .sync
rm = require './rm'
git = require './git'
cp = require './cp'

# Create distro folder
root = 'tmp/dist'
mkdirp "#{root}/#{n}" for n in ['dist', 'sis']

# Copy files
cp = cp root
cp 'README.md'
cp 'sis/junction.exe'
cp "tmp/#{mingzi}.bat", 'dist'

# Create setup.bat
fs.writeFileSync path.join(root, 'setup.bat'),
  """@"%~dp0dist/#{mingzi}.bat" : setup"""

# Git operations
commit = git.current()
rm "#{root}/.git"
git = git root
git "init"
git "remote", 'add', 'origin', '../..'
git "checkout", '-b', 'dist'
git "add", ".", '--force'
git 'commit', '-m', commit
git 'push', 'origin', 'dist', '--force'
{'fraction_non_alphanumeric': 0.2222222222222222, 'fraction_numerical': 0.0012484394506866417, 'mean_word_length': 3.8429003021148036, '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': '324374', 'n_tokens_mistral': 596, 'n_tokens_neox': 587, 'n_words': 188}