<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

var VersionInfo = require('./lib/versionInfo')
var execute = require('./lib/execute')
const ignoredPaths = require('./lib/ignoredPaths')
const config = require('./lib/config')

const isWindows = process.platform === 'win32'
const isDarwin = process.platform === 'darwin'
const arch = 'x64'
const buildDir = 'Brave-' + process.platform + '-' + arch

var appIcon
if (isWindows) {
  appIcon = 'res/app.ico'
} else if (isDarwin) {
  appIcon = 'res/app.icns'
} else {
  appIcon = 'res/app.png'
}

var env = {
  NODE_ENV: 'production',
  CHANNEL: process.env.CHANNEL
}

var channels = { dev: true, beta: true, stable: true }
if (!channels[env.CHANNEL]) {
  throw new Error('CHANNEL environment variable must be set to dev, beta or stable')
}

console.log('Writing buildConfig.js...')
config.writeBuildConfig(
  {
    channel: env.CHANNEL
  },
  'buildConfig.js'
)

var cmds = ['echo cleaning up target...']

if (isWindows) {
  cmds = cmds.concat([
    '(if exist ' + buildDir + ' rmdir /s /q ' + buildDir + ')',
    '(if exist dist rmdir /s /q dist)'
  ])
} else {
  cmds = cmds.concat([
    'rm -Rf ' + buildDir,
    'rm -Rf dist'
  ])
}<commit_msg>Remove Brave.tar.bz2 for linux build package<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

var VersionInfo = require('./lib/versionInfo')
var execute = require('./lib/execute')
const ignoredPaths = require('./lib/ignoredPaths')
const config = require('./lib/config')

const isWindows = process.platform === 'win32'
const isDarwin = process.platform === 'darwin'
const arch = 'x64'
const buildDir = 'Brave-' + process.platform + '-' + arch

var appIcon
if (isWindows) {
  appIcon = 'res/app.ico'
} else if (isDarwin) {
  appIcon = 'res/app.icns'
} else {
  appIcon = 'res/app.png'
}

var env = {
  NODE_ENV: 'production',
  CHANNEL: process.env.CHANNEL
}

var channels = { dev: true, beta: true, stable: true }
if (!channels[env.CHANNEL]) {
  throw new Error('CHANNEL environment variable must be set to dev, beta or stable')
}

console.log('Writing buildConfig.js...')
config.writeBuildConfig(
  {
    channel: env.CHANNEL
  },
  'buildConfig.js'
)

var cmds = ['echo cleaning up target...']

if (isWindows) {
  cmds = cmds.concat([
    '(if exist ' + buildDir + ' rmdir /s /q ' + buildDir + ')',
    '(if exist dist rmdir /s /q dist)'
  ])
} else {
  cmds = cmds.concat([
    'rm -Rf ' + buildDir,
    'rm -Rf dist',
    'rm -f Brave.tar.bz2'
  ])
}
{'fraction_non_alphanumeric': 0.1563845050215208, 'fraction_numerical': 0.006456241032998565, 'mean_word_length': 3.3173374613003097, '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': '5357523', 'n_tokens_mistral': 985, 'n_tokens_neox': 950, 'n_words': 298}