<commit_before>#! /bin/bash

set -o xtrace
set -eu

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

(
  cd "$ROOT/electron"
  npm install
)

(
  cd "$ROOT/lbry"
  git fetch
  git reset --hard origin/master
  git cherry-pick bd75e88ebebb67897c62a1ee1d3228fd269677dc
  pip install -r requirements.txt
  pip install .
  git reset --hard origin/master
)

(
  cd "$ROOT/lbrynet"
  pyinstaller lbry.py -y --windowed --onefile --icon="$ROOT/lbry/packaging/osx/lbry-osx-app/app.icns"
)

(
  cd "$ROOT/lbry-web-ui"
  git fetch
  git reset --hard origin/master
  git cherry-pick 06224b1d2cf4bf1f63d95031502260dd9c3ec5c1
  npm install
  node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/
  node_modules/.bin/webpack
  git reset --hard origin/master
)

cp -R "$ROOT/lbry-web-ui/dist" "$ROOT/electron/"

mv "$ROOT/lbrynet/dist/lbry" "$ROOT/electron/dist"

electron-packager --electron-version=1.4.14 --overwrite "$ROOT/electron" LBRY

echo 'Build complete. Run `electron electron` to launch the app'<commit_msg>in teamcity, create packages for all platforms<commit_after>#! /bin/bash

set -o xtrace
set -eu

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

(
  cd "$ROOT/electron"
  npm install
)

(
  cd "$ROOT/lbry"
  git fetch
  git reset --hard origin/master
  git cherry-pick bd75e88ebebb67897c62a1ee1d3228fd269677dc
  pip install -r requirements.txt
  pip install .
  git reset --hard origin/master
)

(
  cd "$ROOT/lbrynet"
  pyinstaller lbry.py -y --windowed --onefile --icon="$ROOT/lbry/packaging/osx/lbry-osx-app/app.icns"
)

(
  cd "$ROOT/lbry-web-ui"
  git fetch
  git reset --hard origin/master
  git cherry-pick 06224b1d2cf4bf1f63d95031502260dd9c3ec5c1
  npm install
  node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/
  node_modules/.bin/webpack
  git reset --hard origin/master
)

cp -R "$ROOT/lbry-web-ui/dist" "$ROOT/electron/"

mv "$ROOT/lbrynet/dist/lbry" "$ROOT/electron/dist"

if [ -n "${TEAMCITY_VERSION:-}" ]; then
  electron-packager --electron-version=1.4.14 --all --overwrite "$ROOT/electron" LBRY
  echo 'Build and packaging complete.'
else
  echo 'Build complete. Run `electron electron` to launch the app'
fi
{'fraction_non_alphanumeric': 0.14351215038972948, 'fraction_numerical': 0.04951856946354883, 'mean_word_length': 3.4804928131416837, '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': '5403770', 'n_tokens_mistral': 920, 'n_tokens_neox': 844, 'n_words': 197}