<commit_before>#!/bin/bash

echo

# Only potentially push to CocoaPods when it's a tagged build
if [ -z "$TRAVIS_TAG" ]; then
    echo -e "\nBuild is not tagged"
    exit 0
fi

# Make sure tag name looks like a version number
if ! [[ $TRAVIS_TAG =~ ^[0-9\.]+(\-beta[0-9]*)?$ ]]; then
    echo -e "\nBranch build not a valid version number: $TRAVIS_TAG"
    exit 1
else
    echo -e "\nTag looks like a version number: $TRAVIS_TAG"
fi

echo -e "\nLinting podspec..."
# Using sed to remove logging from output until CocoaPods issue #7577 is implemented and I can use the
# OS_ACTIVITY_MODE = disable environment variable from the test spec scheme
pod spec lint --fail-fast --verbose | sed -l '/xctest\[/d; /^$/d'

if [ $? -ne 0 ]; then
    echo -e "\nPodspec failed lint. Run again with --verbose to troubleshoot"
    exit 1
fi

echo -e "\nExporting Carthage archive...\n"
# Exports ARCHIVE_PATH, used below
source ./Scripts/archive-carthage.sh

echo -e "\nPushing to CocoaPods...\n"
pod trunk push

# If push is successful, add release to GitHub
if [ $? -ne 0 ]; then
    echo -e "\nPush to CocoaPods failed"
    exit 1
fi

RELEASE_NOTES=$(./Scripts/get-release-notes.py "$TRAVIS_TAG")
./Scripts/add-github-release.py $GITHUB_RELEASE_API_TOKEN $TRAVIS_REPO_SLUG $TRAVIS_TAG "$ARCHIVE_PATH" "$RELEASE_NOTES"<commit_msg>Skipping test during pod trunk push and pre-push validation (Issue #59)<commit_after>#!/bin/bash

echo

# Only potentially push to CocoaPods when it's a tagged build
if [ -z "$TRAVIS_TAG" ]; then
    echo -e "\nBuild is not tagged"
    exit 0
fi

# Make sure tag name looks like a version number
if ! [[ $TRAVIS_TAG =~ ^[0-9\.]+(\-beta[0-9]*)?$ ]]; then
    echo -e "\nBranch build not a valid version number: $TRAVIS_TAG"
    exit 1
else
    echo -e "\nTag looks like a version number: $TRAVIS_TAG"
fi

# Skip tests because they're assumed to have passed during the cocoapod-validate script or else
# this script wouldn't run
echo -e "\nLinting podspec..."
pod spec lint --fail-fast --skip-tests

if [ $? -ne 0 ]; then
    echo -e "\nPodspec failed lint. Run again with --verbose to troubleshoot"
    exit 1
fi

echo -e "\nExporting Carthage archive...\n"
# Exports ARCHIVE_PATH, used below
source ./Scripts/archive-carthage.sh

# Skip tests for reason stated above
echo -e "\nPushing to CocoaPods...\n"
pod trunk push --skip-tests

# If push is successful, add release to GitHub
if [ $? -ne 0 ]; then
    echo -e "\nPush to CocoaPods failed"
    exit 1
fi

RELEASE_NOTES=$(./Scripts/get-release-notes.py "$TRAVIS_TAG")
./Scripts/add-github-release.py $GITHUB_RELEASE_API_TOKEN $TRAVIS_REPO_SLUG $TRAVIS_TAG "$ARCHIVE_PATH" "$RELEASE_NOTES"
{'fraction_non_alphanumeric': 0.1223184042152804, 'fraction_numerical': 0.00978547233722243, 'mean_word_length': 3.4006622516556293, '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': '773196', 'n_tokens_mistral': 980, 'n_tokens_neox': 931, 'n_words': 337}