<commit_before>#!/bin/bash

# Copyright (c) 2013 - present Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.

set -x
set -e

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")"
ROOT_INFER_DIR="$SCRIPT_DIR"/..
CLANG_PLUGIN_DIR="$ROOT_INFER_DIR"/facebook-clang-plugins
PLATFORM=`uname`
INFER_SOURCE="$ROOT_INFER_DIR"/infer-source

# Build infer and facebook-clang-plugins
cd "$ROOT_INFER_DIR"
# This assumes the current commit is the one with the release bump
./build-infer.sh

# Get a copy of the github repo
git clone https://github.com/facebook/infer.git "$INFER_SOURCE"
pushd "$INFER_SOURCE"
# Name of the release package
VERSION=`git describe --abbrev=0 --tags`
if [ "$PLATFORM" == 'Darwin' ]; then
    RELEASE_NAME=infer-osx-"$VERSION"
else
    RELEASE_NAME=infer-linux64-"$VERSION"
fi
RELEASE_TARBALL="$RELEASE_NAME".tar.xz
PKG_DIR="$ROOT_INFER_DIR"/"$RELEASE_NAME"
PKG_PLUGIN_DIR="$PKG_DIR"/facebook-clang-plugins

git checkout "$VERSION"
git submodule update --init
popd<commit_msg>script to publish github releases<commit_after>#!/bin/bash

# Copyright (c) 2013 - present Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.

set -x
set -e

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")"
ROOT_INFER_DIR="$SCRIPT_DIR"/..
CLANG_PLUGIN_DIR="$ROOT_INFER_DIR"/facebook-clang-plugins
PLATFORM=`uname`
INFER_SOURCE="$ROOT_INFER_DIR"/infer-source

# Build infer and facebook-clang-plugins
cd "$ROOT_INFER_DIR"
# This assumes the current commit is the one with the release bump
./build-infer.sh
# strip clang binaries -- on linux they get huge for some reason
strip facebook-clang-plugins/clang/bin/*
find facebook-clang-plugins/clang/lib -type f -name '*.so' -exec strip \{\} \+
find facebook-clang-plugins/clang/lib -type f -name '*.a' -exec strip \{\} \+

# Get a copy of the github repo
git clone https://github.com/facebook/infer.git "$INFER_SOURCE"
pushd "$INFER_SOURCE"
# Name of the release package
VERSION=`git describe --abbrev=0 --tags`
if [ "$PLATFORM" == 'Darwin' ]; then
    RELEASE_NAME=infer-osx-"$VERSION"
else
    RELEASE_NAME=infer-linux64-"$VERSION"
fi
RELEASE_TARBALL="$RELEASE_NAME".tar.xz
PKG_DIR="$ROOT_INFER_DIR"/"$RELEASE_NAME"
PKG_PLUGIN_DIR="$PKG_DIR"/facebook-clang-plugins

git checkout "$VERSION"
git submodule update --init
popd
{'fraction_non_alphanumeric': 0.13012477718360071, 'fraction_numerical': 0.006417112299465241, 'mean_word_length': 4.957537154989384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4435598', 'n_tokens_mistral': 1016, 'n_tokens_neox': 925, 'n_words': 282}