<commit_before>#!/bin/bash

## get latest code on specified branch
## and extract version info
pushd ~/virtuoso-opensource
VIRT_BRANCH=${VIRT_BRANCH:-"develop/7"}
git checkout $VIRT_BRANCH
git pull

VIRT_VERSION_MAJ=`grep -o -P 'vos_major,\s+\[[0-9]+\]' configure.in | grep -o -P '[0-9]+'`
VIRT_VERSION_MIN=`grep -o -P 'vos_minor,\s+\[[0-9]+\]' configure.in | grep -o -P '[0-9]+'`
VIRT_VERSION_PATCH=`grep -o -P 'vos_patch,\s+\[[0-9]+\]' configure.in | grep -o -P '[0-9]+'`
VIRT_VERSION_DEV=`grep -o -P 'vos_devel,\s+\[\-[a-z0-9-]+\]\)' configure.in | grep -o -P '\-[a-z0-9]+'`
VIRT_CUR_VERSION="$VIRT_VERSION_MAJ.$VIRT_VERSION_MIN.$VIRT_VERSION_PATCH$VIRT_VERSION_DEV"
VIRT_RELEASE=`git rev-parse --short HEAD`
VIRTUOSO_VERSION="$VIRT_CUR_VERSION.$VIRT_RELEASE"
popd


## add version info in the RPM spec
VIR_DATE=`date +"%a %b %d %Y"`
sed -i "s/\#\#VERSION\#\#/$VIRTUOSO_VERSION/" ~/SPECS/virtuoso-opensource.spec
sed -i "s/\#\#DATE\#\#/$VIR_DATE/" ~/SPECS/virtuoso-opensource.spec

## create source package
tar czf ~/SOURCES/virtuoso-opensource-$VIRTUOSO_VERSION.tar.gz --exclude '.git' --transform s/virtuoso-opensource/virtuoso-opensource-$VIRTUOSO_VERSION/ -c ~/virtuoso-opensource .

## build rpm and rpms
pushd ~/SPECS
rpmbuild -ba virtuoso-opensource.spec
popd<commit_msg>output some build information<commit_after>#!/bin/bash

## get latest code on specified branch
## and extract version info
pushd ~/virtuoso-opensource
VIRT_BRANCH=${VIRT_BRANCH:-"develop/7"}
echo "updating virtuoso branch $VIRT_BRANCH"
git checkout $VIRT_BRANCH
git pull

VIRT_VERSION_MAJ=`grep -o -P 'vos_major,\s+\[[0-9]+\]' configure.in | grep -o -P '[0-9]+'`
VIRT_VERSION_MIN=`grep -o -P 'vos_minor,\s+\[[0-9]+\]' configure.in | grep -o -P '[0-9]+'`
VIRT_VERSION_PATCH=`grep -o -P 'vos_patch,\s+\[[0-9]+\]' configure.in | grep -o -P '[0-9]+'`
VIRT_VERSION_DEV=`grep -o -P 'vos_devel,\s+\[\-[a-z0-9-]+\]\)' configure.in | grep -o -P '\-[a-z0-9]+'`
VIRT_CUR_VERSION="$VIRT_VERSION_MAJ.$VIRT_VERSION_MIN.$VIRT_VERSION_PATCH"
VIRT_RELEASE=`git rev-parse --short HEAD`
VIRTUOSO_VERSION="$VIRT_CUR_VERSION.$VIRT_RELEASE"
echo "starting rpm build of $VIRTUOSO_VERSION"
popd


## add version info in the RPM spec
VIR_DATE=`date +"%a %b %d %Y"`
sed -i "s/\#\#VERSION\#\#/$VIRTUOSO_VERSION/" ~/SPECS/virtuoso-opensource.spec
sed -i "s/\#\#DATE\#\#/$VIR_DATE/" ~/SPECS/virtuoso-opensource.spec

## create source package
tar czf ~/SOURCES/virtuoso-opensource-$VIRTUOSO_VERSION.tar.gz --exclude '.git' --transform s/virtuoso-opensource/virtuoso-opensource-$VIRTUOSO_VERSION/ -c ~/virtuoso-opensource .

## build rpm and rpms
pushd ~/SPECS
rpmbuild -ba virtuoso-opensource.spec
popd
{'fraction_non_alphanumeric': 0.19336600075386354, 'fraction_numerical': 0.012815680361854504, 'mean_word_length': 4.634819532908705, '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': '1913360', 'n_tokens_mistral': 1223, 'n_tokens_neox': 1123, 'n_words': 221}