<commit_before>#!/bin/sh

# TODO: consider to create / update the tag when running the release script
# TODO: push changes to google code
# TODO: find out how to save multiple push locations
# claim commits for my other email address

USAGE="Usage: $0 <bzr-tag-to-release> <googlecode-username> <googlecode-password>"

RELEASE_TAG=${1:? $USAGE}
USERNAME=${2:? $USAGE}
PASSWORD=${3:? $USAGE}

cd "$(dirname "$0")/.."

# update changelog
bzr log --log-format=gnu-changelog > CHANGELOG
bzr commit CHANGELOG -m "updated changelog before release"

# build release zip
mkdir -p build
EXPORTED_FILE="build/jquery-editInPlace-v${RELEASE_TAG}.zip"
bzr export --revision="$RELEASE_TAG" "$EXPORTED_FILE"

# upload release zip
SUMMARY="jQuery In Place Editor v${RELEASE_TAG}"
python scripts/googlecode_upload.py \
	--summary="$SUMMARY" \
	--project="jquery-in-place-editor" \
	--user="$USERNAME" \
	--password="$PASSWORD" \
	--labels="Type-Archive,OpSys-All" \
	"$EXPORTED_FILE"

echo
echo
echo "Now you can feature this download at http://code.google.com/p/jquery-in-place-editor/downloads/list"
echo
echo<commit_msg>updated release script to say what it does and tagg and push the release<commit_after>#!/bin/sh

# TODO: consider to create / update the tag when running the release script
# claim commits for my other email address

USAGE="Usage: $0 <bzr-tag-to-release> <googlecode-username> <googlecode-password>"

RELEASE_TAG=${1:? $USAGE}
USERNAME=${2:? $USAGE}
PASSWORD=${3:? $USAGE}

cd "$(dirname "$0")/.."

echo "Updating changelog"
bzr log --log-format=gnu-changelog > CHANGELOG
bzr commit CHANGELOG -m "updated changelog before release"

echo "Tagging release"
bzr tag "$RELEASE_TAG"

echo "Pushing all changes to upstream (googlecode)"
bzr push bm:upstream

echo "Building release zip"
mkdir -p build
EXPORTED_FILE="build/jquery-editInPlace-v${RELEASE_TAG}.zip"
bzr export --revision="$RELEASE_TAG" "$EXPORTED_FILE"

echo "Uploading release zip"
SUMMARY="jQuery In Place Editor v${RELEASE_TAG}"
python scripts/googlecode_upload.py \
	--summary="$SUMMARY" \
	--project="jquery-in-place-editor" \
	--user="$USERNAME" \
	--password="<PASSWORD>" \
	--labels="Type-Archive,OpSys-All" \
	"$EXPORTED_FILE"

echo
echo
echo "Now you can feature this download at http://code.google.com/p/jquery-in-place-editor/downloads/list"
echo
echo
{'fraction_non_alphanumeric': 0.14181349376880104, 'fraction_numerical': 0.004297378599054577, 'mean_word_length': 4.953964194373402, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4805467', 'n_tokens_mistral': 828, 'n_tokens_neox': 780, 'n_words': 222}