<commit_before>#!/usr/bin/env bash

artifact_version=$(cat composer.json | grep \"version\": | cut -d'"' -f 4)

mv out/artifacts/Kushki/kushki-dev.zip out/artifacts/Kushki/kushki-$artifact_version.zip
git add out/artifacts/Kushki/
git commit -m "[snap-ci] adding latest version of zip, version: $artifact_version"
git config --global push.default simple
git pull --rebase
git tag --annotate "v$artifact_version"
git push --tags
curl -X POST -H 'content-type:application/json' \
    "https://packagist.org/api/update-package?username=kushki&apiToken=$PACKAGIST_API_TOKEN" \
    -d '{"repository":{"url":"https://packagist.org/packages/kushki/kushki-php"}}'


# ENVS:
# PACKAGIST_API_TOKEN<commit_msg>+@jreyes33 [KFE-106] Keep a kushki.zip package pointing to the latest version<commit_after>#!/usr/bin/env bash

artifact_version=$(cat composer.json | grep \"version\": | cut -d'"' -f 4)

cp out/artifacts/Kushki/kushki-dev.zip out/artifacts/Kushki/kushki.zip
mv out/artifacts/Kushki/kushki-dev.zip out/artifacts/Kushki/kushki-$artifact_version.zip
git add out/artifacts/Kushki/
git commit -m "[snap-ci] adding latest version of zip, version: $artifact_version"
git config --global push.default simple
git pull --rebase
git tag --annotate "v$artifact_version"
git push --tags
curl -X POST -H 'content-type:application/json' \
    "https://packagist.org/api/update-package?username=kushki&apiToken=$PACKAGIST_API_TOKEN" \
    -d '{"repository":{"url":"https://packagist.org/packages/kushki/kushki-php"}}'


# ENVS:
# PACKAGIST_API_TOKEN
{'fraction_non_alphanumeric': 0.15198956294846705, 'fraction_numerical': 0.0045662100456621, 'mean_word_length': 4.745318352059925, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3276112', 'n_tokens_mistral': 576, 'n_tokens_neox': 550, 'n_words': 116}