<commit_before>#!/bin/bash

myrepo=cloudslang/cloud-slang
ghusertoken=$GH_TOKEN
branch=$GIT_BRANCH

cli_location=build/target/cloudslang-cli/cslang-cli.zip
builder_location=build/target/cslang-builder/cslang-builder.zip

cd $WORKSPACE

echo -e "fetching https://api.github.com/repos/${myrepo}/releases/tags/${branch}\n"

curl https://api.github.com/repos/${myrepo}/releases/tags/${branch} >> res.json

assets_url='grep -e assets_url res.json | awk \'{print $2}\' | grep -oe "[^\"].*[^\,\"]"'

echo ${assets_url}

echo -e "\n\nCreating release from tag branch\n=================================================================================\n"

##################################################################################################################################################

echo -e "\n\nUpoloading artifacts using curl\n=================================================================================\n"

auth_header="Authorization:token $ghusertoken"

#echo -e "\n\nUpoloading slang-cli.tar.gz\n"
#
#curl  --insecure -XPOST -H "Authorization:token $ghusertoken" -H "Content-Type:application/gzip" --data-binary @slang-cli.tar.gz https://uploads.github.com/repos/$myrepo/releases/$uniquereleaseid/assets?name=slang-cli.tar.gz

echo -e "\n\n$cli_location\n"

curl  --insecure -XPOST -H ${auth_header} -H "Content-Type:application/zip" --data-binary @${cli_location} ${assets_url}?name=cslang-cli-with-content.zip

#echo -e "\n\n$builder_location\n"

#curl  --insecure -XPOST -H ${auth_header} -H "Content-Type:application/zip" --data-binary @${builder_location} ${assets_url}?name=cslang-builder.zip

<commit_msg>now it works on my machine<commit_after>#!/bin/bash

myrepo=cloudslang/cloud-slang
ghusertoken=$GH_TOKEN
branch=$GIT_BRANCH
build_dir=$WORKSPACE

cli_location=build/target/cloudslang-cli/cslang-cli.zip
builder_location=build/target/cslang-builder/cslang-builder.zip

cd ${build_dir}

echo -e "fetching https://api.github.com/repos/${myrepo}/releases/tags/${branch}\n"

curl https://api.github.com/repos/${myrepo}/releases/tags/${branch} > ${build_dir}/res.json

assets_url=$(grep -e assets_url ${build_dir}/res.json | awk '{print $2}' | grep -oe '[^\"].*[^\,\"]')

echo ${assets_url}


##################################################################################################################################################

echo -e "\n\nUpoloading artifacts using curl\n=================================================================================\n"

auth_header="Authorization:token $ghusertoken"

#echo -e "\n\nUpoloading slang-cli.tar.gz\n"
#
#curl  --insecure -XPOST -H "Authorization:token $ghusertoken" -H "Content-Type:application/gzip" --data-binary @slang-cli.tar.gz https://uploads.github.com/repos/$myrepo/releases/$uniquereleaseid/assets?name=slang-cli.tar.gz

echo -e "\n\n$cli_location\n"

curl  --insecure -XPOST -H ${auth_header} -H "Content-Type:application/zip" --data-binary @${cli_location} ${assets_url}?name=cslang-cli-with-content.zip

#echo -e "\n\n$builder_location\n"

#curl  --insecure -XPOST -H ${auth_header} -H "Content-Type:application/zip" --data-binary @${builder_location} ${assets_url}?name=cslang-builder.zip


{'fraction_non_alphanumeric': 0.3206011271133375, 'fraction_numerical': 0.0006261740763932373, 'mean_word_length': 6.021978021978022, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 6, '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': '6796740', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1043, 'n_words': 163}