<commit_before>#!/bin/sh

set -exu

err() {
   echo "$@" >&2
   exit 1
}

BIN="percona-agent"
CWD="$PWD"

PLATFORM=`uname -m`
if [ "$PLATFORM" = "x86_64" ]; then
   ARCH="amd64"
elif [ "$PLATFORM" = "i686" -o "$PLATFORM" = "i386" ]; then
   ARCH="386"
else
   error "Unknown platform: $PLATFORM"
fi

# Install/update deps
./agent-build/agent-build -build=false

# Chdir to repo root and set vendor dir in GOPATH
cd ../
VENDOR_DIR="$PWD/vendor"
export GOPATH="$VENDOR_DIR:$GOPATH"

# Build percona-agent
cd bin/percona-agent
if [ -n "${1:-""}" ]; then
   VER="$1"
else<commit_msg>Use x86_64 and i386 arch in pkg names.<commit_after>#!/bin/sh

set -exu

err() {
   echo "$@" >&2
   exit 1
}

BIN="percona-agent"
CWD="$PWD"

PLATFORM=`uname -m`
if [ "$PLATFORM" = "x86_64" ]; then
   ARCH="x86_64"  # no change
elif [ "$PLATFORM" = "i686" -o "$PLATFORM" = "i386" ]; then
   ARCH="i386"
else
   error "Unknown platform: $PLATFORM"
fi

# Install/update deps
./agent-build/agent-build -build=false

# Chdir to repo root and set vendor dir in GOPATH
cd ../
VENDOR_DIR="$PWD/vendor"
export GOPATH="$VENDOR_DIR:$GOPATH"

# Build percona-agent
cd bin/percona-agent
if [ -n "${1:-""}" ]; then
   VER="$1"
else
{'fraction_non_alphanumeric': 0.18530884808013356, 'fraction_numerical': 0.03923205342237062, 'mean_word_length': 3.7019607843137257, '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': '2316399', 'n_tokens_mistral': 541, 'n_tokens_neox': 506, 'n_words': 126}