<commit_before>#!/bin/bash

# exit if error
set -o errexit

# define a few variables
node_output_name="Breeze-$os_platform-$arch"
app_output_name="breeze-$TRAVIS_OS_NAME-$arch"
app_output_zip_name="breeze-$TRAVIS_OS_NAME-$arch.zip"

if [ "$TRAVIS_OS_NAME" = "osx" ]
then
  dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/$app_output_name/Breeze.app/contents/resources/app/assets/daemon
else
  dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/$app_output_name/resources/app/assets/daemon
fi

echo "current environment variables:"
echo "OS name:" $TRAVIS_OS_NAME
echo "Platform:" $os_platform
echo "Build directory:" $TRAVIS_BUILD_DIR
echo "Node version:" $TRAVIS_NODE_VERSION
echo "Architecture:" $arch
echo "Configuration:" $configuration
echo "Node.js output name:" $node_output_name
echo "App output folder name:" $app_output_name
echo "App output zip file name:" $app_output_zip_name
echo "dotnet resources path in app:" $dotnet_resources_path_in_app
echo "Branch:" $TRAVIS_BRANCH
echo "Tag:" $TRAVIS_TAG
echo "Commit:" $TRAVIS_COMMIT
echo "Commit message:" $TRAVIS_COMMIT_MESSAGE


dotnet --info

# Initialize dependencies
echo $log_prefix STARTED restoring dotnet and npm packages
cd $TRAVIS_BUILD_DIR
git submodule update --init --recursive

cd $TRAVIS_BUILD_DIR/Breeze.UI

npm install -g npm@6.2.0
npm install -g npx
echo $log_prefix FINISHED restoring dotnet and npm packages

# dotnet publish
echo $log_prefix running 'dotnet publish'
cd $TRAVIS_BUILD_DIR/StratisBitcoinFullNode/src/Stratis.BreezeD
dotnet publish -c $configuration -r $TRAVIS_OS_NAME-$arch -v m -o $TRAVIS_BUILD_DIR/Breeze.UI/daemon

echo $log_prefix chmoding the Stratis.BreezeD file
chmod +x $TRAVIS_BUILD_DIR/Breeze.UI/daemon/Stratis.BreezeD

# node Build
cd $TRAVIS_BUILD_DIR/Breeze.UI
echo $log_prefix running 'npm run'
npm run build:prod

# node packaging
echo $log_prefix packaging breeze 
if [ "$TRAVIS_OS_NAME" = "osx" ]
then
  npx electron-builder build --mac --$arch
else
  npx electron-builder build --linux --$arch
fi
<commit_msg>added cross-env<commit_after>#!/bin/bash

# exit if error
set -o errexit

# define a few variables
node_output_name="Breeze-$os_platform-$arch"
app_output_name="breeze-$TRAVIS_OS_NAME-$arch"
app_output_zip_name="breeze-$TRAVIS_OS_NAME-$arch.zip"

if [ "$TRAVIS_OS_NAME" = "osx" ]
then
  dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/$app_output_name/Breeze.app/contents/resources/app/assets/daemon
else
  dotnet_resources_path_in_app=$TRAVIS_BUILD_DIR/breeze_out/$app_output_name/resources/app/assets/daemon
fi

echo "current environment variables:"
echo "OS name:" $TRAVIS_OS_NAME
echo "Platform:" $os_platform
echo "Build directory:" $TRAVIS_BUILD_DIR
echo "Node version:" $TRAVIS_NODE_VERSION
echo "Architecture:" $arch
echo "Configuration:" $configuration
echo "Node.js output name:" $node_output_name
echo "App output folder name:" $app_output_name
echo "App output zip file name:" $app_output_zip_name
echo "dotnet resources path in app:" $dotnet_resources_path_in_app
echo "Branch:" $TRAVIS_BRANCH
echo "Tag:" $TRAVIS_TAG
echo "Commit:" $TRAVIS_COMMIT
echo "Commit message:" $TRAVIS_COMMIT_MESSAGE


dotnet --info

# Initialize dependencies
echo $log_prefix STARTED restoring dotnet and npm packages
cd $TRAVIS_BUILD_DIR
git submodule update --init --recursive

cd $TRAVIS_BUILD_DIR/Breeze.UI

npm install -g npm@6.2.0
npm install -g cross-env
npm install -g npx
echo $log_prefix FINISHED restoring dotnet and npm packages

# dotnet publish
echo $log_prefix running 'dotnet publish'
cd $TRAVIS_BUILD_DIR/StratisBitcoinFullNode/src/Stratis.BreezeD
dotnet publish -c $configuration -r $TRAVIS_OS_NAME-$arch -v m -o $TRAVIS_BUILD_DIR/Breeze.UI/daemon

echo $log_prefix chmoding the Stratis.BreezeD file
chmod +x $TRAVIS_BUILD_DIR/Breeze.UI/daemon/Stratis.BreezeD

# node Build
cd $TRAVIS_BUILD_DIR/Breeze.UI
echo $log_prefix running 'npm run'
npm run build:prod

# node packaging
echo $log_prefix packaging breeze 
if [ "$TRAVIS_OS_NAME" = "osx" ]
then
  npx electron-builder build --mac --$arch
else
  npx electron-builder build --linux --$arch
fi

{'fraction_non_alphanumeric': 0.09773336582988057, 'fraction_numerical': 0.0014623446258835, 'mean_word_length': 6.06368330464716, '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': '7158347', 'n_tokens_mistral': 1521, 'n_tokens_neox': 1499, 'n_words': 373}