<commit_before>#!/bin/bash
# script used in travis CI continuos deployement, called by .travis.yml 
# initially from https://github.com/probonopd/uploadtool/raw/master/upload.sh 
set +x # Do not leak information

# checks for command line argument to this script
# Exit immediately if one of the files given as arguments is not there
# because we don't want to delete the existing release if we don't have
# the new files that should be uploaded 
for file in "$@"
do
    if [ ! -e "$file" ]
    then echo "$file is missing, giving up." >&2; exit 1
    fi
done

echo "Processing"
echo $UPLOADTOOL_SUFFIX
echo $TRAVIS_TAG
echo $TRAVIS_OS_NAME


if [ $# -eq 0 ]; then
    echo "No artifacts to use for release, giving up."
    exit 0
fi

if command -v sha256sum >/dev/null 2>&1 ; then
  shatool="sha256sum"
elif command -v shasum >/dev/null 2>&1 ; then
  shatool="shasum -a 256" # macOS fallback
else
  echo "Neither sha256sum nor shasum is available, cannot check hashes"
fi

# echo "printing out the upload suffix"
# echo  "$UPLOADTOOL_SUFFIX"

# NAME OF RELEASE
# The calling script (usually .travis.yml) can set a suffix to be used for
# the tag and release name. This way it is possible to have a release for
# the output of the CI/CD pipeline (marked as 'continuous') and also test
# builds for other branches.
# If this build was triggered by a tag, call the result a Release
# if [ ! -z "$UPLOADTOOL_SUFFIX" ] ; then
#   if [ "$UPLOADTOOL_SUFFIX" = "$TRAVIS_TAG" ] ; then
#     RELEASE_NAME=$TRAVIS_TAG
#     RELEASE_TITLE="$TRAVIS_TAG $TRAVIS_OS_NAME"
#     is_prerelease="false"
#   else
#     RELEASE_NAME="continuous-$UPLOADTOOL_SUFFIX"
#     RELEASE_TITLE="Continuous build ($UPLOADTOOL_SUFFIX)"
#     is_prerelease="true"
#   fi
# else
#   RELEASE_NAME="continuous" # Do not use "latest" as it is reserved by GitHub
#   RELEASE_TITLE="Continuous build"
#   is_prerelease="true"
# fi

RELEASE_NAME="$UPLOADTOOL_SUFFIX-$TRAVIS_TAG-$TRAVIS_OS_NAME"
RELEASE_TITLE="$UPLOADTOOL_SUFFIX $TRAVIS_TAG $TRAVIS_OS_NAME"
is_prerelease="false"

if [ "$ARTIFACTORY_BASE_URL" != "" ]; then
  echo "ARTIFACTORY_BASE_URL set, trying to upload to artifactory"

  if [ "$ARTIFACTORY_API_KEY" == "" ]; then
    echo "Please set ARTIFACTORY_API_KEY"
    exit 1
  fi
<commit_msg>checking names<commit_after>#!/bin/bash
# script used in travis CI continuos deployement, called by .travis.yml 
# initially from https://github.com/probonopd/uploadtool/raw/master/upload.sh 
set +x # Do not leak information

# checks for command line argument to this script
# Exit immediately if one of the files given as arguments is not there
# because we don't want to delete the existing release if we don't have
# the new files that should be uploaded 
for file in "$@"
do
    if [ ! -e "$file" ]
    then echo "$file is missing, giving up." >&2; exit 1
    fi
done

echo "Processing"
echo $UPLOADTOOL_SUFFIX
echo $TRAVIS_TAG
echo $TRAVIS_OS_NAME


if [ $# -eq 0 ]; then
    echo "No artifacts to use for release, giving up."
    exit 0
fi

if command -v sha256sum >/dev/null 2>&1 ; then
  shatool="sha256sum"
elif command -v shasum >/dev/null 2>&1 ; then
  shatool="shasum -a 256" # macOS fallback
else
  echo "Neither sha256sum nor shasum is available, cannot check hashes"
fi

# echo "printing out the upload suffix"
# echo  "$UPLOADTOOL_SUFFIX"

# NAME OF RELEASE
# The calling script (usually .travis.yml) can set a suffix to be used for
# the tag and release name. This way it is possible to have a release for
# the output of the CI/CD pipeline (marked as 'continuous') and also test
# builds for other branches.
# If this build was triggered by a tag, call the result a Release
# if [ ! -z "$UPLOADTOOL_SUFFIX" ] ; then
#   if [ "$UPLOADTOOL_SUFFIX" = "$TRAVIS_TAG" ] ; then
#     RELEASE_NAME=$TRAVIS_TAG
#     RELEASE_TITLE="$TRAVIS_TAG $TRAVIS_OS_NAME"
#     is_prerelease="false"
#   else
#     RELEASE_NAME="continuous-$UPLOADTOOL_SUFFIX"
#     RELEASE_TITLE="Continuous build ($UPLOADTOOL_SUFFIX)"
#     is_prerelease="true"
#   fi
# else
#   RELEASE_NAME="continuous" # Do not use "latest" as it is reserved by GitHub
#   RELEASE_TITLE="Continuous build"
#   is_prerelease="true"
# fi

RELEASE_NAME="$UPLOADTOOL_SUFFIX-$TRAVIS_TAG-$TRAVIS_OS_NAME"
RELEASE_TITLE="$UPLOADTOOL_SUFFIX $TRAVIS_TAG $TRAVIS_OS_NAME"
is_prerelease="false"

echo  "Infos"
echo $RELEASE_NAME
echo $RELEASE_TITLE


if [ "$ARTIFACTORY_BASE_URL" != "" ]; then
  echo "ARTIFACTORY_BASE_URL set, trying to upload to artifactory"

  if [ "$ARTIFACTORY_API_KEY" == "" ]; then
    echo "Please set ARTIFACTORY_API_KEY"
    exit 1
  fi

{'fraction_non_alphanumeric': 0.09886759581881534, 'fraction_numerical': 0.009146341463414634, 'mean_word_length': 4.097669256381798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '6973694', 'n_tokens_mistral': 1696, 'n_tokens_neox': 1598, 'n_words': 539}