<commit_before>#!/usr/bin/perl
use File::Slurp;
use strict;
use warnings;
my @spark_versions = ("1.1.1", "1.2.0", "1.3.0");
# Backup the build file
`cp build.sbt build.sbt_back`;
# Get the original version
my $input = read_file("build.sbt");
my $original_version;
if ($input =~ /version\s+\:\=\s+\"(.+?)\"/) {
    $original_version = $1;
} else {
    die "Could not extract version";
}
print "Cross building for $original_version";
foreach my $spark_version (@spark_versions) {
    my $target_version = $spark_version."_".$original_version;
    print "New target version ".$target_version;
    my $new_build = $input;
    $new_build =~ s/version\s+\:\=\s+\".+?\"/version := "$target_version"/;
    $new_build =~ s/sparkVersion\s+\:\=\s+\".+?\"/sparkVersion := "$spark_version"/;
    print "new build file $new_build hit";
    open (OUT, ">build.sbt");
    print OUT $new_build;
    close (OUT);
    print "building";
    print `./sbt/sbt clean compile package publishSigned spPublish`;
    print "built"
}
`cp build.sbt_back build.sbt`;
`./sbt/sbt clean compile package publishSigned spPublish`;<commit_msg>Push to github so that SparkPackages Jenkins can do its thing<commit_after>#!/usr/bin/perl
use File::Slurp;
use strict;
use warnings;
my @spark_versions = ("1.1.1", "1.2.0", "1.3.0");
# Backup the build file
`cp build.sbt build.sbt_back`;
# Get the original version
my $input = read_file("build.sbt");
my $original_version;
if ($input =~ /version\s+\:\=\s+\"(.+?)\"/) {
    $original_version = $1;
} else {
    die "Could not extract version";
}
print "Cross building for $original_version";
foreach my $spark_version (@spark_versions) {
    my $target_version = $spark_version."_".$original_version;
    print "New target version ".$target_version;
    my $new_build = $input;
    $new_build =~ s/version\s+\:\=\s+\".+?\"/version := "$target_version"/;
    $new_build =~ s/sparkVersion\s+\:\=\s+\".+?\"/sparkVersion := "$spark_version"/;
    print `git branch -d release-v$target_version`;
    print `git checkout -b release-v$target_version`;
    print "new build file $new_build hit";
    open (OUT, ">build.sbt");
    print OUT $new_build;
    close (OUT);
    print `git commit -am "Make release for $target_version"`;
    print `git push --set-upstream origin release-v$target_version`;
    print "building";
    print `./sbt/sbt clean compile package publishSigned spPublish`;
    print "switch back to master";
    print `git checkout master`;
    print "built"
}
`cp build.sbt_back build.sbt`;
`./sbt/sbt clean compile package publishSigned spPublish`;
{'fraction_non_alphanumeric': 0.17250778816199377, 'fraction_numerical': 0.00778816199376947, 'mean_word_length': 3.8747628083491463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5152230', 'n_tokens_mistral': 927, 'n_tokens_neox': 894, 'n_words': 240}