<commit_before>APP_FILE=$1
APP_NAME=$2

HK_SOURCES=$(curl -ns -X POST https://api.heroku.com/apps/${APP_NAME}/sources -H 'Accept: application/vnd.heroku+json; version=3')
HK_GET_URL=$(expr "$HK_SOURCES" : ".*\"get_url\":\"\(https://.*\)\",")
HK_PUT_URL=$(expr "$HK_SOURCES" : ".*\"put_url\":\"\(https://.*\)\"")

echo "---> Uploading application package..."
curl "$HK_PUT_URL" -X PUT -H 'Content-Type:' --data-binary @${APP_FILE}

echo "---> Creating new release..."
curl -n -X POST https://api.heroku.com/apps/${APP_NAME}/builds \
-H "Accept: application/vnd.heroku+json; version=3" \
-H "Content-Type: application/json" \
-d "{ \"source_blob\": {
  \"url\": \"${HK_GET_URL}\",
  \"version\": \"v1.0.1\"
}}"<commit_msg>more improvements to the deploy script<commit_after>APP_FILE=$1
APP_NAME=$2

HK_TOKEN=`(echo -n ":" ; echo "${HEROKU_API_TOKEN}") | base64`

HK_SOURCES=$(curl -s -X POST https://api.heroku.com/apps/${APP_NAME}/sources -H "Authorization: ${HK_TOKEN}" -H 'Accept: application/vnd.heroku+json; version=3')
HK_GET_URL=$(expr "$HK_SOURCES" : ".*\"get_url\":\"\(https://.*\)\",")
HK_PUT_URL=$(expr "$HK_SOURCES" : ".*\"put_url\":\"\(https://.*\)\"")

echo "---> Uploading application package..."
curl "$HK_PUT_URL" -X PUT -H 'Content-Type:' --data-binary @${APP_FILE}

echo "---> Creating new release..."
curl -X POST https://api.heroku.com/apps/${APP_NAME}/builds \
-H "Accept: application/vnd.heroku+json; version=3" \
-H "Authorization: ${HK_TOKEN}" \
-H "Content-Type: application/json" \
-d "{ \"source_blob\": {
  \"url\": \"${HK_GET_URL}\",
  \"version\": \"v1.0.1\"
}}"
{'fraction_non_alphanumeric': 0.26398491514770583, 'fraction_numerical': 0.01005656819610308, 'mean_word_length': 3.975, 'pattern_counts': {'":': 11, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 8, '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': '2668632', 'n_tokens_mistral': 656, 'n_tokens_neox': 615, 'n_words': 117}