<commit_before>#!/bin/bash

set -e

vers=`grep AM_INIT_AUTOMAKE configure.ac | head -1 | cut '-d '  -f 2 | sed 's/)//'`
echo vers $vers

repo=$1
force=$2

[ -z "$repo" ] && echo stable or testing or unstable && exit 1

if git diff --quiet ; then
    echo repository is clean
else
    echo
    echo "**** REPOSITORY IS DIRTY ****"
    echo
    if [ "$force" != "force" ]; then
	echo "add 'force' argument if you really want to continue."
	exit 1
    fi
    echo "forcing."
fi

echo generating git version stamp
cd src
./make_version
gitver=`grep GIT_VER ceph_ver.h | awk '{print $3}' | cut -c 1-8`
echo gitver $gitver
cd ..

if [ "$repo" = "testing" ]; then
    versuffix=`date "+%Y%m%d%H%M"`
    finalvers="${vers}-testing${versuffix}-$gitver"
else
    if [ "$repo" = "unstable" ]; then
	versuffix=`date "+%Y%m%d%H%M"`
	finalvers="${vers}-unstable${versuffix}-$gitver"
    else<commit_msg>debian: simplify release.sh<commit_after>#!/bin/bash

set -e

vers=`grep AM_INIT_AUTOMAKE configure.ac | head -1 | cut '-d '  -f 2 | sed 's/)//'`
echo vers $vers

repo=$1
force=$2

[ -z "$repo" ] && echo stable or testing or unstable && exit 1

if git diff --quiet ; then
    echo repository is clean
else
    echo
    echo "**** REPOSITORY IS DIRTY ****"
    echo
    if [ "$force" != "force" ]; then
	echo "add 'force' argument if you really want to continue."
	exit 1
    fi
    echo "forcing."
fi

gitver=`git rev-parse HEAD 2>/dev/null | cut -c 1-8`
echo gitver $gitver

if [ "$repo" = "testing" ]; then
    versuffix=`date "+%Y%m%d%H%M"`
    finalvers="${vers}-testing${versuffix}-$gitver"
else
    if [ "$repo" = "unstable" ]; then
	versuffix=`date "+%Y%m%d%H%M"`
	finalvers="${vers}-unstable${versuffix}-$gitver"
    else
{'fraction_non_alphanumeric': 0.17636786961583237, 'fraction_numerical': 0.010477299185098952, 'mean_word_length': 3.2867830423940148, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5160462', 'n_tokens_mistral': 666, 'n_tokens_neox': 629, 'n_words': 194}