<commit_before>#!/usr/bin/env bash

set -e

export EXTRA_STACK="--no-haddock-deps"

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
    if [[ "$TRAVIS_BRANCH" == "master" ]]; then
#      export EXTRA_STACK="--haddock";
    :
    fi

    export EXTRA_STACK="--test $EXTRA_STACK";
fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  export EXTRA_STACK="--flag cardano-sl:for-installer $EXTRA_STACK"
fi

stack --nix --no-terminal install happy \
  $EXTRA_STACK --fast --ghc-options="-j +RTS -A128m -n2m -RTS" --jobs=4

stack --nix --no-terminal --local-bin-path daedalus/ install cardano-sl \
  $EXTRA_STACK --fast --ghc-options="-j +RTS -A128m -n2m -RTS" --jobs=4 \
  --flag cardano-sl:-asserts \
  --flag cardano-sl-core:-dev-mode | ts

if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_BRANCH" == "master" ]]; then
  ./update_wallet_web_api_docs.sh
#  ./update_haddock.sh
fi

stack exec --nix -- cardano-wallet-hs2purs

pushd daedalus
  nix-shell --run "npm install && npm run build:prod"
  echo $TRAVIS_BUILD_NUMBER > build-id
  cp ../log-config-prod.yaml .
popd

# Replace TRAVIS_BRANCH slash not to fail on subdirectory missing
echo "Packing up daedalus-bridge ..."
XZ_OPT=-1 tar cJf s3/daedalus-bridge-$TRAVIS_OS_NAME-${TRAVIS_BRANCH/\//-}.tar.xz daedalus/
echo "Done"
<commit_msg>Add PR check for update docs script.<commit_after>#!/usr/bin/env bash

set -e

export EXTRA_STACK="--no-haddock-deps"

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
    if [[ "$TRAVIS_BRANCH" == "master" ]]; then
#      export EXTRA_STACK="--haddock";
    :
    fi

    export EXTRA_STACK="--test $EXTRA_STACK";
fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  export EXTRA_STACK="--flag cardano-sl:for-installer $EXTRA_STACK"
fi

stack --nix --no-terminal install happy \
  $EXTRA_STACK --fast --ghc-options="-j +RTS -A128m -n2m -RTS" --jobs=4

stack --nix --no-terminal --local-bin-path daedalus/ install cardano-sl \
  $EXTRA_STACK --fast --ghc-options="-j +RTS -A128m -n2m -RTS" --jobs=4 \
  --flag cardano-sl:-asserts \
  --flag cardano-sl-core:-dev-mode | ts

if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
  ./update_wallet_web_api_docs.sh
#  ./update_haddock.sh
fi

stack exec --nix -- cardano-wallet-hs2purs

pushd daedalus
  nix-shell --run "npm install && npm run build:prod"
  echo $TRAVIS_BUILD_NUMBER > build-id
  cp ../log-config-prod.yaml .
popd

# Replace TRAVIS_BRANCH slash not to fail on subdirectory missing
echo "Packing up daedalus-bridge ..."
XZ_OPT=-1 tar cJf s3/daedalus-bridge-$TRAVIS_OS_NAME-${TRAVIS_BRANCH/\//-}.tar.xz daedalus/
echo "Done"

{'fraction_non_alphanumeric': 0.174079754601227, 'fraction_numerical': 0.009969325153374233, 'mean_word_length': 3.2911184210526314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '884760', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1071, 'n_words': 230}