<commit_before>#!/usr/bin/env parrot
# Copyright (C) 2010, Parrot Foundation.
# $Id$

.sub 'main' :main
    .local string version_file_name
    version_file_name = 'VERSION'

    # read the version
    $P0 = new 'FileHandle'
    $P0.'open'( version_file_name, 'r' )
    $S0 = $P0.'readline'()
    $P0.'close'()

    print 'version: '
    print $S0

    # split the version
    $P1 = split '.', $S0

    # increment version
    $I0 = $P1[1]
    inc $I0
    if $I0 != 12 goto NOT_NILL
    $I0 = $P1[0]
    inc $I0
    $P1[0] = $I0
    $I0 = 0
NOT_NILL:
    $P1[1] = $I0

    # join the incremented version
    $S0 = join '.', $P1

    print 'new version: '
    print $S0

    # write the new version to the version_file
    $P0.'open'( version_file_name, 'w' )
    $P0.'print'( $S0 )
    $P0.'close'() 
.end

# Local Variables:
#   mode: pir
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
<commit_msg>remove whitespace<commit_after>#!/usr/bin/env parrot
# Copyright (C) 2010, Parrot Foundation.
# $Id$

.sub 'main' :main
    .local string version_file_name
    version_file_name = 'VERSION'

    # read the version
    $P0 = new 'FileHandle'
    $P0.'open'( version_file_name, 'r' )
    $S0 = $P0.'readline'()
    $P0.'close'()

    print 'version: '
    print $S0

    # split the version
    $P1 = split '.', $S0

    # increment version
    $I0 = $P1[1]
    inc $I0
    if $I0 != 12 goto NOT_NILL
    $I0 = $P1[0]
    inc $I0
    $P1[0] = $I0
    $I0 = 0
NOT_NILL:
    $P1[1] = $I0

    # join the incremented version
    $S0 = join '.', $P1

    print 'new version: '
    print $S0

    # write the new version to the version_file
    $P0.'open'( version_file_name, 'w' )
    $P0.'print'( $S0 )
    $P0.'close'()
.end

# Local Variables:
#   mode: pir
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:

{'fraction_non_alphanumeric': 0.15551930396954866, 'fraction_numerical': 0.04567699836867863, 'mean_word_length': 2.4137291280148423, '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': '2846329', 'n_tokens_mistral': 788, 'n_tokens_neox': 747, 'n_words': 195}