<commit_before>#!/bin/bash

# Get the version from the spec file (TODO)
if [[ -r VERSION ]]; then
    # OBDI_SEMANTIC_VERSION is set in the VERSION file
    source VERSION
else
    echo "VERSION file does not exist."
    exit 1
fi

# Get the list of top level files before we make changes
files=`echo * | sed 's/rpmbuild//'`

mkdir -p rpmbuild/BUILD/
mkdir -p rpmbuild/RPMS/
mkdir -p rpmbuild/SOURCES/
mkdir -p rpmbuild/SPECS/
mkdir -p rpmbuild/SRPMS/

cp dist/redhat6/obdi_rh6.spec rpmbuild/SPECS

# Copy 
mkdir -p rpmbuild/SOURCES/obdi-$VERSION
cp -a $files rpmbuild/SOURCES/obdi-$VERSION

# Compress
cd rpmbuild/SOURCES
tar cvzf obdi-$VERSION.tar.gz obdi-$VERSION

cd ..
rpmbuild --define "_topdir `pwd`" \
         --define "BUILD_NUMBER $BUILD_NUMBER" \
         --define "OBDI_SEMANTIC_VERSION $OBDI_SEMANTIC_VERSION" \
         -bb SPECS/obdi_rh6.spec
<commit_msg>VERSION fix<commit_after>#!/bin/bash

# Get the version from the spec file (TODO)
if [[ -r VERSION ]]; then
    # OBDI_SEMANTIC_VERSION is set in the VERSION file
    source VERSION
else
    echo "VERSION file does not exist."
    exit 1
fi

# Get the list of top level files before we make changes
files=`echo * | sed 's/rpmbuild//'`

mkdir -p rpmbuild/BUILD/
mkdir -p rpmbuild/RPMS/
mkdir -p rpmbuild/SOURCES/
mkdir -p rpmbuild/SPECS/
mkdir -p rpmbuild/SRPMS/

cp dist/redhat6/obdi_rh6.spec rpmbuild/SPECS

# Copy 
mkdir -p rpmbuild/SOURCES/obdi-$OBDI_SEMANTIC_VERSION
cp -a $files rpmbuild/SOURCES/obdi-$OBDI_SEMANTIC_VERSION

# Compress
cd rpmbuild/SOURCES
tar cvzf obdi-$OBDI_SEMANTIC_VERSION obdi-$OBDI_SEMANTIC_VERSION

cd ..
rpmbuild --define "_topdir `pwd`" \
         --define "BUILD_NUMBER $BUILD_NUMBER" \
         --define "OBDI_SEMANTIC_VERSION $OBDI_SEMANTIC_VERSION" \
         -bb SPECS/obdi_rh6.spec

{'fraction_non_alphanumeric': 0.10396869759642258, 'fraction_numerical': 0.004471771939631079, 'mean_word_length': 3.2822966507177034, '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': '4400784', 'n_tokens_mistral': 740, 'n_tokens_neox': 691, 'n_words': 185}