<commit_before>#!/bin/bash -e

# Input parameters
export ARCHITECTURE="$1"
export OS="$2"
export ARTIFACTS_BUCKET="$3"
export VERSION=master

# reqExec
export REQ_EXEC_PATH="$REQEXEC_REPO_STATE"
export REQ_EXEC_PACKAGE_PATH="$REQEXEC_REPO_STATE/package/$ARCHITECTURE/$OS"

# Binaries
export REQ_EXEC_BINARY_DIR="/tmp/reqExec"
export REQ_EXEC_BINARY_TAR="/tmp/reqExec-$VERSION-$ARCHITECTURE-$OS.tar.gz"
export S3_BUCKET_BINARY_DIR="$ARTIFACTS_BUCKET/reqExec/$VERSION/"

check_input() {
  if [ -z "$ARCHITECTURE" ]; then
    echo "Missing input parameter ARCHITECTURE"
    exit 1
  fi

  if [ -z "$OS" ]; then
    echo "Missing input parameter OS"
    exit 1
  fi

  if [ -z "$ARTIFACTS_BUCKET" ]; then
    echo "Missing input parameter ARTIFACTS_BUCKET"
    exit 1
  fi
}

create_binaries_dir() {
  echo "Cleaning up $REQ_EXEC_BINARY_DIR..."
  rm -rf $REQ_EXEC_BINARY_DIR
  mkdir $REQ_EXEC_BINARY_DIR
}

build_reqExec() {
  pushd $REQ_EXEC_PATH
    echo "Packaging reqExec..."
    ./$REQ_EXEC_PACKAGE_PATH/package.sh

    echo "Copying dist..."
    cp -r dist $REQ_EXEC_BINARY_DIR
  popd
}

push_to_s3() {
  echo "Pushing to S3..."
  tar -zcvf "$REQ_EXEC_BINARY_TAR" -C "$REQ_EXEC_BINARY_DIR" .
  aws s3 cp --acl public-read "$REQ_EXEC_BINARY_TAR" "$S3_BUCKET_BINARY_DIR"
}<commit_msg>Fix path<commit_after>#!/bin/bash -e

# Input parameters
export ARCHITECTURE="$1"
export OS="$2"
export ARTIFACTS_BUCKET="$3"
export VERSION=master

# reqExec
export REQ_EXEC_PATH="$REQEXEC_REPO_STATE"
export REQ_EXEC_PACKAGE_PATH="$REQEXEC_REPO_STATE/package/$ARCHITECTURE/$OS"

# Binaries
export REQ_EXEC_BINARY_DIR="/tmp/reqExec"
export REQ_EXEC_BINARY_TAR="/tmp/reqExec-$VERSION-$ARCHITECTURE-$OS.tar.gz"
export S3_BUCKET_BINARY_DIR="$ARTIFACTS_BUCKET/reqExec/$VERSION/"

check_input() {
  if [ -z "$ARCHITECTURE" ]; then
    echo "Missing input parameter ARCHITECTURE"
    exit 1
  fi

  if [ -z "$OS" ]; then
    echo "Missing input parameter OS"
    exit 1
  fi

  if [ -z "$ARTIFACTS_BUCKET" ]; then
    echo "Missing input parameter ARTIFACTS_BUCKET"
    exit 1
  fi
}

create_binaries_dir() {
  echo "Cleaning up $REQ_EXEC_BINARY_DIR..."
  rm -rf $REQ_EXEC_BINARY_DIR
  mkdir $REQ_EXEC_BINARY_DIR
}

build_reqExec() {
  pushd $REQ_EXEC_PATH
    echo "Packaging reqExec..."
    $REQ_EXEC_PACKAGE_PATH/package.sh

    echo "Copying dist..."
    cp -r dist $REQ_EXEC_BINARY_DIR
  popd
}

push_to_s3() {
  echo "Pushing to S3..."
  tar -zcvf "$REQ_EXEC_BINARY_TAR" -C "$REQ_EXEC_BINARY_DIR" .
  aws s3 cp --acl public-read "$REQ_EXEC_BINARY_TAR" "$S3_BUCKET_BINARY_DIR"
}
{'fraction_non_alphanumeric': 0.1210464662241312, 'fraction_numerical': 0.008590394377196407, 'mean_word_length': 4.271604938271605, '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': '101692', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1027, 'n_words': 207}