<commit_before>#!/bin/bash

# exit if a command fails
set -e

if [ -z "${nuget_source_path_or_url}" ] ; then
  echo " [!] Missing required input: nuget_source_path_or_url"
  exit 1
fi

if [ -z "${nuget_api_key}" ] ; then
  echo " [!] Missing required input: nuget_api_key"
  exit 1
fi

if [ -z "${nuspec_pattern}" ] ; then
  nuspec_pattern="^\.\/[^/]+.nuspec"
fi

if [ -z "${nupkg_pattern}" ] ; then
  nupkg_pattern="^\.\/[^/]+.nupkg"
fi

nuget="/Library/Frameworks/Mono.framework/Versions/Current/bin/nuget"

echo " (i) Packaging specs matching pattern ${nuspec_pattern}"

# find nuspecs matching pattern
find -E . -type f -iregex "${nuspec_pattern}" | while read i; do
	echo " (i) Packaging ${i}..."
	"${nuget}" pack "${i}" -noninteractive -verbosity "detailed"
	echo " (i) Done"
done

echo ""
echo " (i) Packages created successfully"


echo " (i) Pushing packages matching pattern ${nupkg_pattern}"

# find packages matching pattern
find -E . -type f -iregex "${nupkg_pattern}" | while read i; do
	echo " (i) Pushing ${i}..."
	"${nuget}" push "${i}" -source "${nuget_source_path_or_url}" -apikey ${nuget_api_key} -noninteractive -verbosity "detailed"
	echo " (i) Done"
done<commit_msg>Temporarily disable package push while testing<commit_after>#!/bin/bash

# exit if a command fails
set -e

if [ -z "${nuget_source_path_or_url}" ] ; then
  echo " [!] Missing required input: nuget_source_path_or_url"
  exit 1
fi

if [ -z "${nuget_api_key}" ] ; then
  echo " [!] Missing required input: nuget_api_key"
  exit 1
fi

if [ -z "${nuspec_pattern}" ] ; then
  nuspec_pattern="^\.\/[^/]+.nuspec"
fi

if [ -z "${nupkg_pattern}" ] ; then
  nupkg_pattern="^\.\/[^/]+.nupkg"
fi

nuget="/Library/Frameworks/Mono.framework/Versions/Current/bin/nuget"

echo " (i) Packaging specs matching pattern ${nuspec_pattern}"

# find nuspecs matching pattern
find -E . -type f -iregex "${nuspec_pattern}" | while read i; do
	echo " (i) Packaging ${i}..."
	"${nuget}" pack "${i}" -noninteractive -verbosity "detailed"
	echo " (i) Done"
done

echo ""
echo " (i) Packages created successfully"


echo " (i) Pushing packages matching pattern ${nupkg_pattern}"

# find packages matching pattern
find -E . -type f -iregex "${nupkg_pattern}" | while read i; do
	echo " (i) Pushing ${i}..."
	echo "${nuget}" push "${i}" -source "${nuget_source_path_or_url}" -apikey ${nuget_api_key} -noninteractive -verbosity "detailed"
	echo " (i) Done"
done
{'fraction_non_alphanumeric': 0.17052980132450332, 'fraction_numerical': 0.0016556291390728477, 'mean_word_length': 4.131634819532909, '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': '6750911', 'n_tokens_mistral': 930, 'n_tokens_neox': 905, 'n_words': 255}