<commit_before>#!/bin/bash

set -e

# This reads the pom.xml file in the current directory, and extracts the first version element in the xml version element.
version=`grep -o -a -m 1 -h -r "version>.*</version" pom.xml | head -1 | sed "s/version//g" | sed "s/>//" | sed "s/<\///g"`

echo "version is: $version"

dist=karamel-$version

mvn clean package
cd target

#create linux archive
cp -r appassembler/* $dist/
cp ../README.linux $dist/README.txt
tar zcf ${dist}.tgz $dist
mv $dist ${dist}-linux


#create jar archive
mkdir ${dist}-jar
cp karamel-ui-${version}-shaded.jar ${dist}-jar/karamel-ui-${version}.jar
cp -r appassembler/examples ${dist}-jar/
cp -r appassembler/conf/* ${dist}-jar/ 
cp ../README.jar ${dist}-jar/README.txt 
zip -r ${dist}-jar.zip $dist-jar

scp ${dist}.tgz g<EMAIL>:/var/www/karamel.io/sites/default/files/downloads/
scp ${dist}-jar.zip g<EMAIL>:/var/www/karamel.io/sites/default/files/downloads/

echo "Now building windows distribution"
cd ..
mvn -Dwin clean package
cd target
mv karamel.exe $dist
#create windows archive
cp ../README.windows $dist/README.txt
zip -r ${dist}.zip $dist

mv ${dist} ${dist}-windows

scp ${dist}.zip g<EMAIL>:/var/www/karamel.io/sites/default/files/downloads/
cd ..

echo "finished releasing karamel"<commit_msg>Now signing the windows .exe file - deploy will only work on snurran on jim's account<commit_after>#!/bin/bash

set -e

# This reads the pom.xml file in the current directory, and extracts the first version element in the xml version element.
version=`grep -o -a -m 1 -h -r "version>.*</version" pom.xml | head -1 | sed "s/version//g" | sed "s/>//" | sed "s/<\///g"`

echo "version is: $version"

dist=karamel-$version
certs_dir=/home/jdowling/Dropbox/karamel/certs

mvn clean package
cd target

#create linux archive
cp -r appassembler/* $dist/
cp ../README.linux $dist/README.txt
tar zcf ${dist}.tgz $dist
mv $dist ${dist}-linux


#create jar archive
mkdir ${dist}-jar
cp karamel-ui-${version}-shaded.jar ${dist}-jar/karamel-ui-${version}.jar
cp -r appassembler/examples ${dist}-jar/
cp -r appassembler/conf/* ${dist}-jar/ 
cp ../README.jar ${dist}-jar/README.txt 
zip -r ${dist}-jar.zip $dist-jar

scp ${dist}.tgz <EMAIL>:/var/www/karamel.io/sites/default/files/downloads/
scp ${dist}-jar.zip g<EMAIL>:/var/www/karamel.io/sites/default/files/downloads/

echo "Now building windows distribution"
cd ..
mvn -Dwin clean package
cd target
osslsigncode -spc ${certs_dir}/authenticode.spc -key ${certs_dir}/authenticode.key -t http://timestamp.verisign.com/scripts/timstamp.dll -in karamel.exe -out karamel-signed.exe
mv karamel-signed.exe $dist/karamel.exe
#create windows archive
cp ../README.windows $dist/README.txt
zip -r ${dist}.zip $dist

mv ${dist} ${dist}-windows

scp ${dist}.zip <EMAIL>:/var/www/karamel.io/sites/default/files/downloads/
cd ..

echo "finished releasing karamel"
{'fraction_non_alphanumeric': 0.16719132563833508, 'fraction_numerical': 0.0013990905911157748, 'mean_word_length': 3.8556876061120544, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2747292', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1027, 'n_words': 289}