<commit_before>#!/bin/sh
set -x
set -e

PKG=rsandbox

TAG="$1"
if [ "x$TAG" = "x" ]; then
    echo "Usage: release.sh <release-tag>" 1>&2
    exit 2
fi

SHA=$(git rev-parse --verify $TAG)
if [ "x$SHA" = "x" ]; then
    exit 3
fi

for dist in \
    oneiric \
    precise \
    quantal \
    ; do
    git reset --hard $SHA
    sed -r -e "1 s/\((.+)\)/(\1~${dist}1)/" -i debian/changelog
    dch -a "git revision $SHA"
    dch --release --distribution $dist ""
    rm -f ../${PKG}*${dist}1*.dsc ../${PKG}*${dist}1*source.changes ../${PKG}*${dist}1*.ppa.upload
    dpkg-buildpackage -S -kAD117A2E
    dput ppa:rohanpm/${PKG} ../${PKG}*${dist}1*source.changes
done
git reset --hard $SHA<commit_msg>release.sh: allow specifying count suffix<commit_after>#!/bin/sh
set -x
set -e

PKG=rsandbox

TAG="$1"
if [ "x$TAG" = "x" ]; then
    echo "Usage: release.sh <release-tag> [<count>]" 1>&2
    exit 2
fi

COUNT="$2"

if [ -z "$COUNT" ]; then
    COUNT=1
fi

SHA=$(git rev-parse --verify $TAG)
if [ "x$SHA" = "x" ]; then
    exit 3
fi

for dist in \
    oneiric \
    precise \
    quantal \
    ; do
    git reset --hard $SHA
    sed -r -e "1 s/\((.+)\)/(\1~${dist}${COUNT})/" -i debian/changelog
    dch -a "git revision $SHA"
    dch --release --distribution $dist ""
    rm -f ../${PKG}*${dist}${COUNT}*.dsc ../${PKG}*${dist}${COUNT}*source.changes ../${PKG}*${dist}${COUNT}*.ppa.upload
    dpkg-buildpackage -S -kAD117A2E
    dput ppa:rohanpm/${PKG} ../${PKG}*${dist}${COUNT}*source.changes
done
git reset --hard $SHA
{'fraction_non_alphanumeric': 0.22420634920634921, 'fraction_numerical': 0.01917989417989418, 'mean_word_length': 2.5938242280285038, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '7011637', 'n_tokens_mistral': 659, 'n_tokens_neox': 631, 'n_words': 157}