<commit_before>#!/bin/bash

if (! $TRAVIS) then
    pushd "$(dirname "$0")"
fi

rm -rf artifacts
if ! type dnvm > /dev/null 2>&1; then
    curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
fi

# work around restore timeouts on Mono
[ -z "$MONO_THREADS_PER_CPU" ] && export MONO_THREADS_PER_CPU=50

# HACK - dnu restore with beta4 fails most of the time
# due to timeouts or other failures.
# Fetch the latest dnu and use that instead
#export DNX_UNSTABLE_FEED=https://www.myget.org/F/aspnetmaster/api/v2/
dnvm update-self
dnvm install 1.0.0-beta8
dnvm use 1.0.0-beta8
dnu restore
# end hack

dnvm install 1.0.0-beta4
dnvm use 1.0.0-beta4
dnu restore
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi

pushd tests/OmniSharp.Bootstrap.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Dnx.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.MSBuild.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Plugins.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Roslyn.CSharp.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.ScriptCs.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Stdio.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

dnvm use 1.0.0-beta4

OMNISHARP_VERSION="1.0.0-dev";
if [ $TRAVIS_TAG ]; then
  OMNISHARP_VERSION=${TRAVIS_TAG:1};
fi

if [ $TRAVIS ]; then
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Abstractions/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Bootstrap/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Dnx/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.MSBuild/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Nuget/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Roslyn/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Roslyn.CSharp/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.ScriptCs/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Stdio/project.json.temp

  mv src/OmniSharp/project.json.temp src/OmniSharp/project.json
  mv src/OmniSharp.Abstractions/project.json.temp src/OmniSharp.Abstractions/project.json
  mv src/OmniSharp.Bootstrap/project.json.temp src/OmniSharp.Bootstrap/project.json
  mv src/OmniSharp.Dnx/project.json.temp src/OmniSharp.Dnx/project.json
  mv src/OmniSharp.MSBuild/project.json.temp src/OmniSharp.MSBuild/project.json
  mv src/OmniSharp.Nuget/project.json.temp src/OmniSharp.Nuget/project.json<commit_msg>Properly update project.json versions<commit_after>#!/bin/bash

if (! $TRAVIS) then
    pushd "$(dirname "$0")"
fi

rm -rf artifacts
if ! type dnvm > /dev/null 2>&1; then
    curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
fi

# work around restore timeouts on Mono
[ -z "$MONO_THREADS_PER_CPU" ] && export MONO_THREADS_PER_CPU=50

# HACK - dnu restore with beta4 fails most of the time
# due to timeouts or other failures.
# Fetch the latest dnu and use that instead
#export DNX_UNSTABLE_FEED=https://www.myget.org/F/aspnetmaster/api/v2/
dnvm update-self
dnvm install 1.0.0-beta8
dnvm use 1.0.0-beta8
dnu restore
# end hack

dnvm install 1.0.0-beta4
dnvm use 1.0.0-beta4
dnu restore
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi

pushd tests/OmniSharp.Bootstrap.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Dnx.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.MSBuild.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Plugins.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Roslyn.CSharp.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.ScriptCs.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Stdio.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

pushd tests/OmniSharp.Tests
dnx . test -parallel none
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
popd

dnvm use 1.0.0-beta4

OMNISHARP_VERSION="1.0.0-dev";
if [ $TRAVIS_TAG ]; then
  OMNISHARP_VERSION=${TRAVIS_TAG:1};
fi

if [ $TRAVIS ]; then
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp/project.json > src/OmniSharp/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Abstractions/project.json > src/OmniSharp.Abstractions/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Bootstrap/project.json > src/OmniSharp.Bootstrap/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Dnx/project.json > src/OmniSharp.Dnx/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.MSBuild/project.json > src/OmniSharp.MSBuild/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Nuget/project.json > src/OmniSharp.Nuget/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Roslyn/project.json > src/OmniSharp.Roslyn/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Roslyn.CSharp/project.json > src/OmniSharp.Roslyn.CSharp/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.ScriptCs/project.json > src/OmniSharp.ScriptCs/project.json.temp
  jq '.version="'$OMNISHARP_VERSION'"' src/OmniSharp.Stdio/project.json > src/OmniSharp.Stdio/project.json.temp

  mv src/OmniSharp/project.json.temp src/OmniSharp/project.json
  mv src/OmniSharp.Abstractions/project.json.temp src/OmniSharp.Abstractions/project.json
  mv src/OmniSharp.Bootstrap/project.json.temp src/OmniSharp.Bootstrap/project.json
  mv src/OmniSharp.Dnx/project.json.temp src/OmniSharp.Dnx/project.json
  mv src/OmniSharp.MSBuild/project.json.temp src/OmniSharp.MSBuild/project.json
  mv src/OmniSharp.Nuget/project.json.temp src/OmniSharp.Nuget/project.json
{'fraction_non_alphanumeric': 0.15223056875670704, 'fraction_numerical': 0.012264295569523225, 'mean_word_length': 4.299756295694557, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '5114146', 'n_tokens_mistral': 2708, 'n_tokens_neox': 2502, 'n_words': 550}