<commit_before>version: 1.1.0.{build}

init: 
  - git config --global core.autocrlf true 

image: Visual Studio 2017
platform: Any CPU

configuration: Debug

build:
  project: src/pytocs.sln
  verbosity: minimal

environment:
  artifacts_dir: bin


before_build:
  - nuget restore src/pytocs.sln

after_build:
  - ps : >-
        $shortHash = $env:APPVEYOR_REPO_COMMIT.Substring(0, 10);
        $versionCli = ls ./src/Cli/bin/$env:CONFIGURATION/net471/Pytocs.Cli.exe | % VersionInfo | % ProductVersion;
        $versionGui = ls ./src/Gui/bin/$env:CONFIGURATION/net471/Pytocs.Gui.exe | % VersionInfo | % ProductVersion;
        mkdir $env:artifacts_dir;
        ;
        <# zip Pytocs.Cli.exe, append version and short hash #>;
        "[after_build] compressing Pytocs.Cli (.NET Framework)...";
        cp -r ./assets/cli-full ./src/Cli/bin/$env:CONFIGURATION/net471/
        7z a $env:artifacts_dir/pytocs-cli-net471-$versionCli-$shortHash.zip ./src/Cli/bin/$env:CONFIGURATION/net471/.;
        "[after_build] compressing Pytocs.Cli (.NET Core)...";
        cp -r ./assets/cli-core ./src/Cli/bin/$env:CONFIGURATION/netcoreapp2.1/
        7z a $env:artifacts_dir/pytocs-cli-netcore21-$versionCli-$shortHash.zip ./src/Cli/bin/$env:CONFIGURATION/netcoreapp2.1/.;
        ;
        <# zip Pytocs.Gui.exe, append version and short hash #>;
        "[after_build] compressing Pytocs.Gui (.NET Framework)...";
        cp -r ./assets/gui-full ./src/Gui/bin/$env:CONFIGURATION/net471/
        7z a $env:artifacts_dir/pytocs-gui-net471-$versionGui-$shortHash.zip ./src/Gui/bin/$env:CONFIGURATION/net471/.;
        "[after_build] compressing Pytocs.Gui (.NET Core)...";
        cp -r ./assets/gui-core ./src/Gui/bin/$env:CONFIGURATION/netcoreapp2.1/
        7z a $env:artifacts_dir/pytocs-gui-netcore21-$versionGui-$shortHash.zip ./src/Gui/bin/$env:CONFIGURATION/netcoreapp2.1/.;
        ;

test_script:
  - cmd: dir /s .\src\Core\bin\%CONFIGURATION%
  - cmd: '%xunit20%\xunit.console ./src/Pytocs.Tests/bin/%CONFIGURATION%/net471/Pytocs.Tests.dll -appveyor'
 # - cmd: python ./subjects/regressionTests.py --check-output --configuration=%CONFIGURATION%

artifacts:
  - path: '**\Pytocs-*.zip'
    name: Pytocs executables<commit_msg>Fixed appveyor.yml<commit_after>version: 1.1.0.{build}

init: 
  - git config --global core.autocrlf true 

image: Visual Studio 2017
platform: Any CPU

configuration: Debug

build:
  project: src/pytocs.sln
  verbosity: minimal

environment:
  artifacts_dir: bin


before_build:
  - nuget restore src/pytocs.sln

after_build:
  - ps : >-
        $shortHash = $env:APPVEYOR_REPO_COMMIT.Substring(0, 10);
        $versionCli = ls ./src/Cli/bin/$env:CONFIGURATION/net471/Pytocs.Cli.exe | % VersionInfo | % ProductVersion;
        $versionGui = ls ./src/Gui/bin/$env:CONFIGURATION/net471/Pytocs.Gui.exe | % VersionInfo | % ProductVersion;
        mkdir $env:artifacts_dir;
        ;
        <# zip Pytocs.Cli.exe, append version and short hash #>;
        "[after_build] compressing Pytocs.Cli (.NET Framework)...";
        cp -r ./assets/cli-full ./src/Cli/bin/$env:CONFIGURATION/net471/.;
        7z a $env:artifacts_dir/pytocs-cli-net471-$versionCli-$shortHash.zip ./src/Cli/bin/$env:CONFIGURATION/net471/.;
        "[after_build] compressing Pytocs.Cli (.NET Core)...";
        cp -r ./assets/cli-core ./src/Cli/bin/$env:CONFIGURATION/netcoreapp2.1/.;
        7z a $env:artifacts_dir/pytocs-cli-netcore21-$versionCli-$shortHash.zip ./src/Cli/bin/$env:CONFIGURATION/netcoreapp2.1/.;
        ;
        <# zip Pytocs.Gui.exe, append version and short hash #>;
        "[after_build] compressing Pytocs.Gui (.NET Framework)...";
        cp -r ./assets/gui-full ./src/Gui/bin/$env:CONFIGURATION/net471/.;
        7z a $env:artifacts_dir/pytocs-gui-net471-$versionGui-$shortHash.zip ./src/Gui/bin/$env:CONFIGURATION/net471/.;
        "[after_build] compressing Pytocs.Gui (.NET Core)...";
        cp -r ./assets/gui-core ./src/Gui/bin/$env:CONFIGURATION/netcoreapp2.1/.;
        7z a $env:artifacts_dir/pytocs-gui-netcore21-$versionGui-$shortHash.zip ./src/Gui/bin/$env:CONFIGURATION/netcoreapp2.1/.;
        ;

test_script:
  - cmd: dir /s .\src\Core\bin\%CONFIGURATION%
  - cmd: '%xunit20%\xunit.console ./src/Pytocs.Tests/bin/%CONFIGURATION%/net471/Pytocs.Tests.dll -appveyor'
 # - cmd: python ./subjects/regressionTests.py --check-output --configuration=%CONFIGURATION%

artifacts:
  - path: '**\Pytocs-*.zip'
    name: Pytocs executables
{'fraction_non_alphanumeric': 0.1593813046402152, 'fraction_numerical': 0.024658148397220355, 'mean_word_length': 2.9451812555260832, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1941162', 'n_tokens_mistral': 1767, 'n_tokens_neox': 1609, 'n_words': 264}