<commit_before>#!/bin/bash
set -euo pipefail
set nullglob

echo Get dependencies
go get -d

rm -rf discosrv-*-*

build() {
	export GOOS="$1"
	export GOARCH="$2"
	target="discosrv-$GOOS-$GOARCH"
	go build -v
	mkdir "$target"
	if [ -f discosrv ] ; then
		mv discosrv "$target"
		tar zcvf "$target.tar.gz" "$target" 
	fi
	if [ -f discosrv.exe ] ; then
	      	mv discosrv.exe "$target"
		zip -r "$target.zip" "$target"
	fi
}

for goos in linux darwin windows ; do
	build "$goos" amd64
done
for goos in linux windows ; do
	build "$goos" 386
done

# Hack used because we run as root under Docker
if [[ ${CHOWN_USER:-} != "" ]] ; then
	chown -R $CHOWN_USER .
fi<commit_msg>Also build for solaris and freebsd<commit_after>#!/bin/bash
set -euo pipefail
set nullglob

echo Get dependencies
go get -d

rm -rf discosrv-*-*

build() {
	export GOOS="$1"
	export GOARCH="$2"
	target="discosrv-$GOOS-$GOARCH"
	go build -v
	mkdir "$target"
	if [ -f discosrv ] ; then
		mv discosrv "$target"
		tar zcvf "$target.tar.gz" "$target" 
	fi
	if [ -f discosrv.exe ] ; then
	      	mv discosrv.exe "$target"
		zip -r "$target.zip" "$target"
	fi
}

for goos in linux darwin windows freebsd solaris ; do
	build "$goos" amd64
done
for goos in linux windows freebsd ; do
	build "$goos" 386
done

# Hack used because we run as root under Docker
if [[ ${CHOWN_USER:-} != "" ]] ; then
	chown -R $CHOWN_USER .
fi
{'fraction_non_alphanumeric': 0.13778100072516317, 'fraction_numerical': 0.01015228426395939, 'mean_word_length': 3.2990654205607477, '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': '3411544', 'n_tokens_mistral': 580, 'n_tokens_neox': 533, 'n_words': 181}