<commit_before>platform:
  - x86
  - x64

configuration:
  - debug
  - release

environment:
  matrix:
    - DC: dmd
    - DC: ldc

matrix:
  exclude:
    - DC: dmd
      configuration: release
#    - DC: dmd
#      platform: x86

skip_tags: true

artifacts:
  - path: selery-hub.exe
    name: hub
  - path: selery-node.exe
    name: node
  - path: selery.exe
    name: default
  - path: selery-portable-%selery_version%.exe
    name: portable
  - path: selery-%selery_version%-windows-%lower_platform%.zip
    name: zip

deploy:
  - provider: GitHub
    tag: v$(selery_version)
    release: Selery $(selery_version)
    description: "$(release_notes)"
    auth_token:
      secure: <KEY>
    artifact: selery-%selery_version%-windows-%lower_platform%.zip
    force_update: true
    on:
      DC: ldc2
      configuration: release
      selery_is_release: true
  - provider: GitHub
    tag: v$(selery_version)
    release: Selery $(selery_version)
    description: "$(release_notes)"
    auth_token:
      secure: <KEY>
    artifact: selery-portable-%selery_version%.exe
    force_update: true
    on:
      DC: ldc2
      configuration: release
      platform: x86
      selery_is_release: true

install:
  - ps: function SetUpDCompiler
        {
            if($env:platform -eq "x86"){
              $env:DConf = "m32";
              $env:lower_platform = "x86";
            }
            elseif($env:platform -eq "x64"){
              $env:DConf = "m64";
              $env:lower_platform = "x64";
            }
            if($env:DC -eq "dmd"){
              $version = (appveyor DownloadFile "http://downloads.dlang.org/releases/LATEST").toString();
              $env:DVersion = $version;
              $env:toolchain = "msvc";
              appveyor DownloadFile "http://downloads.dlang.org/releases/2.x/$($version)/dmd.$($version).windows.7z" -FileName "c:\dmd.7z";
              echo "finished.";
              pushd c:\\;
              7z x dmd.7z > $null;
              popd;
            }
            elseif($env:DC -eq "ldc"){
              $version = (appveyor DownloadFile "https://ldc-developers.github.io/LATEST").toString().replace("`n","").replace("`r","");
              $env:DVersion = $version;
              $env:toolchain = "msvc";
              appveyor DownloadFile "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-windows-$($env:lower_platform).7z" -FileName "c:\ldc.7z";
              echo "finished.";
              pushd c:\\;
              7z x ldc.7z > $null;
              mv ldc2-$($version)-windows-$($env:lower_platform) ldc2;
              popd;
            }
        }
  - ps: SetUpDCompiler
  - appveyor DownloadFile "https://github.com/electron/rcedit/releases/download/v1.0.0/rcedit-x86.exe" -FileName rcedit.exe
  - appveyor DownloadFile "http://code.dlang.org/files/dub-1.3.0-windows-x86.zip" -FileName dub.zip
  - 7z x dub.zip -odub > nul
  - set PATH=%CD%;%CD%\%binpath%;%CD%\dub;%PATH%
  - dub --version

before_build:
  - ps: if($env:platform -eq "x86"){
            $env:compilersetupargs = "x86";
            if($env:DC -eq "dmd"){
              $env:Darch = "x86_mscoff";
            }
            elseif($env:DC -eq "ldc") {
              $env:Darch = "x86";
            }
            $env:Darch = "x86";
          }
        elseif($env:platform -eq "x64"){
            $env:compilersetupargs = "amd64";
            $env:Darch = "x86_64";
        }
  - ps : if($env:DC -eq "dmd"){
           $env:PATH += ";C:\dmd2\windows\bin;";
         }
         elseif($env:DC -eq "ldc"){
           $env:PATH += ";C:\ldc2\bin";
           $env:DC = "ldc2";
         }
  - ps: $env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall";
  - '"%compilersetup%" %compilersetupargs%'
  - mkdir plugins
#  - git clone https://github.com/selery-plugins/rcon.git plugins/rcon
  - git clone https://github.com/selery-plugins/vanilla.git plugins/vanilla
#  - git clone https://github.com/selery-plugins/web-admin.git plugins/web-admin
  - git clone https://github.com/selery-plugins/web-view.git plugins/web-view

build_script:
  - build.bat -c %DC% %CONFIGURATION% -a %Darch% hub
  - build.bat -c %DC% %CONFIGURATION% -a %Darch% node
  - build.bat -c %DC% %CONFIGURATION% -a %Darch% default
  - build.bat -c %DC% %CONFIGURATION% -a %Darch% default --portable

after_build:
  - cd builder\views
  - set /p selery_version=<version.txt
  - set /p release_notes=<notes.txt
  - set /p selery_is_release=<is_release.txt
  - cd ..\..

  - rcedit selery-hub.exe --set-version-string ProductName "Selery's hub"
  - rcedit selery-hub.exe --set-version-string FileDescription "Selery's hub %selery_version%"
  - rcedit selery-hub.exe --set-version-string OriginalFileName selery-hub.exe
  - rcedit selery-hub.exe --set-file-version %selery_version%.0
  - rcedit selery-hub.exe --set-product-version %selery_version%
  - rcedit selery-hub.exe --set-icon assets\icons\hub.ico
  
  - rcedit selery-node.exe --set-version-string ProductName "Selery's node"
  - rcedit selery-node.exe --set-version-string FileDescription "Selery's node %selery_version%"
  - rcedit selery-node.exe --set-version-string OriginalFileName selery-node.exe
  - rcedit selery-node.exe --set-file-version %selery_version%.0
  - rcedit selery-node.exe --set-product-version %selery_version%
  - rcedit selery-node.exe --set-icon assets\icons\node.ico
  
  - rcedit selery.exe --set-version-string ProductName "Selery"
  - rcedit selery.exe --set-version-string FileDescription "Selery %selery_version%"
  - rcedit selery.exe --set-version-string OriginalFileName selery.exe
  - rcedit selery.exe --set-file-version %selery_version%.0
  - rcedit selery.exe --set-product-version %selery_version%
  - rcedit selery.exe --set-icon assets\icons\default.ico
  
  - rename selery-%selery_version%.exe selery-portable-%selery_version%.exe
  - rcedit selery-portable-%selery_version%.exe --set-version-string ProductName "Selery portable"
  - rcedit selery-portable-%selery_version%.exe --set-version-string FileDescription "Selery portable %selery_version%"
  - rcedit selery-portable-%selery_version%.exe --set-version-string OriginalFileName selery-portable-%selery_version%.exe
  - rcedit selery-portable-%selery_version%.exe --set-file-version %selery_version%.0
  - rcedit selery-portable-%selery_version%.exe --set-product-version %selery_version%
  - rcedit selery-portable-%selery_version%.exe --set-icon assets\icons\default.ico
  
  - rmdir /s /q assets\icons
  - 7z a selery-%selery_version%-windows-%lower_platform%.zip LICENSE selery-hub.exe selery-node.exe selery.exe assets\

test_script:
  - selery-hub --about
  - selery-node --about
  - selery --about
  - selery-portable-%selery_version% --about
  
on_success:
  - set RESULT=0
  
on_failure:
  - set RESULT=1
  
on_finish:
  - appveyor DownloadFile "https://gist.githubusercontent.com/Kripth/e570f715c27d0a345619e2ea881ed97d/raw/" -FileName update.d
  - rdmd update.d
<commit_msg>Use curl<commit_after>platform:
  - x86
  - x64

configuration:
  - debug
  - release

environment:
  matrix:
    - DC: dmd
    - DC: ldc

matrix:
  exclude:
    - DC: dmd
      configuration: release
#    - DC: dmd
#      platform: x86

skip_tags: true

artifacts:
  - path: selery-hub.exe
    name: hub
  - path: selery-node.exe
    name: node
  - path: selery.exe
    name: default
  - path: selery-portable-%selery_version%.exe
    name: portable
  - path: selery-%selery_version%-windows-%lower_platform%.zip
    name: zip

deploy:
  - provider: GitHub
    tag: v$(selery_version)
    release: Selery $(selery_version)
    description: "$(release_notes)"
    auth_token:
      secure: ioKlisLYTQCnQTUDVHlgLw24mtQ2/uMlCOt4BPvioprrpHYROYCP1lR/oFER/EIB
    artifact: selery-%selery_version%-windows-%lower_platform%.zip
    force_update: true
    on:
      DC: ldc2
      configuration: release
      selery_is_release: true
  - provider: GitHub
    tag: v$(selery_version)
    release: Selery $(selery_version)
    description: "$(release_notes)"
    auth_token:
      secure: <KEY>
    artifact: selery-portable-%selery_version%.exe
    force_update: true
    on:
      DC: ldc2
      configuration: release
      platform: x86
      selery_is_release: true

install:
  - ps: function SetUpDCompiler
        {
            if($env:platform -eq "x86"){
              $env:DConf = "m32";
              $env:lower_platform = "x86";
            }
            elseif($env:platform -eq "x64"){
              $env:DConf = "m64";
              $env:lower_platform = "x64";
            }
            if($env:DC -eq "dmd"){
              $version = (curl -L "http://downloads.dlang.org/releases/LATEST").toString();
              $env:DVersion = $version;
              $env:toolchain = "msvc";
              appveyor DownloadFile "http://downloads.dlang.org/releases/2.x/$($version)/dmd.$($version).windows.7z" -FileName "c:\dmd.7z";
              echo "finished.";
              pushd c:\\;
              7z x dmd.7z > $null;
              popd;
            }
            elseif($env:DC -eq "ldc"){
              $version = (curl -L "https://ldc-developers.github.io/LATEST").toString().replace("`n","").replace("`r","");
              $env:DVersion = $version;
              $env:toolchain = "msvc";
              appveyor DownloadFile "https://github.com/ldc-developers/ldc/releases/download/v$($version)/ldc2-$($version)-windows-$($env:lower_platform).7z" -FileName "c:\ldc.7z";
              echo "finished.";
              pushd c:\\;
              7z x ldc.7z > $null;
              mv ldc2-$($version)-windows-$($env:lower_platform) ldc2;
              popd;
            }
        }
  - ps: SetUpDCompiler
  - appveyor DownloadFile "https://github.com/electron/rcedit/releases/download/v1.0.0/rcedit-x86.exe" -FileName rcedit.exe
  - appveyor DownloadFile "http://code.dlang.org/files/dub-1.3.0-windows-x86.zip" -FileName dub.zip
  - 7z x dub.zip -odub > nul
  - set PATH=%CD%;%CD%\%binpath%;%CD%\dub;%PATH%
  - dub --version

before_build:
  - ps: if($env:platform -eq "x86"){
            $env:compilersetupargs = "x86";
            if($env:DC -eq "dmd"){
              $env:Darch = "x86_mscoff";
            }
            elseif($env:DC -eq "ldc") {
              $env:Darch = "x86";
            }
            $env:Darch = "x86";
          }
        elseif($env:platform -eq "x64"){
            $env:compilersetupargs = "amd64";
            $env:Darch = "x86_64";
        }
  - ps : if($env:DC -eq "dmd"){
           $env:PATH += ";C:\dmd2\windows\bin;";
         }
         elseif($env:DC -eq "ldc"){
           $env:PATH += ";C:\ldc2\bin";
           $env:DC = "ldc2";
         }
  - ps: $env:compilersetup = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall";
  - '"%compilersetup%" %compilersetupargs%'
  - mkdir plugins
#  - git clone https://github.com/selery-plugins/rcon.git plugins/rcon
  - git clone https://github.com/selery-plugins/vanilla.git plugins/vanilla
#  - git clone https://github.com/selery-plugins/web-admin.git plugins/web-admin
  - git clone https://github.com/selery-plugins/web-view.git plugins/web-view

build_script:
  - build.bat -c %DC% %CONFIGURATION% -a %Darch% hub
  - build.bat -c %DC% %CONFIGURATION% -a %Darch% node
  - build.bat -c %DC% %CONFIGURATION% -a %Darch% default
  - build.bat -c %DC% %CONFIGURATION% -a %Darch% default --portable

after_build:
  - cd builder\views
  - set /p selery_version=<version.txt
  - set /p release_notes=<notes.txt
  - set /p selery_is_release=<is_release.txt
  - cd ..\..

  - rcedit selery-hub.exe --set-version-string ProductName "Selery's hub"
  - rcedit selery-hub.exe --set-version-string FileDescription "Selery's hub %selery_version%"
  - rcedit selery-hub.exe --set-version-string OriginalFileName selery-hub.exe
  - rcedit selery-hub.exe --set-file-version %selery_version%.0
  - rcedit selery-hub.exe --set-product-version %selery_version%
  - rcedit selery-hub.exe --set-icon assets\icons\hub.ico
  
  - rcedit selery-node.exe --set-version-string ProductName "Selery's node"
  - rcedit selery-node.exe --set-version-string FileDescription "Selery's node %selery_version%"
  - rcedit selery-node.exe --set-version-string OriginalFileName selery-node.exe
  - rcedit selery-node.exe --set-file-version %selery_version%.0
  - rcedit selery-node.exe --set-product-version %selery_version%
  - rcedit selery-node.exe --set-icon assets\icons\node.ico
  
  - rcedit selery.exe --set-version-string ProductName "Selery"
  - rcedit selery.exe --set-version-string FileDescription "Selery %selery_version%"
  - rcedit selery.exe --set-version-string OriginalFileName selery.exe
  - rcedit selery.exe --set-file-version %selery_version%.0
  - rcedit selery.exe --set-product-version %selery_version%
  - rcedit selery.exe --set-icon assets\icons\default.ico
  
  - rename selery-%selery_version%.exe selery-portable-%selery_version%.exe
  - rcedit selery-portable-%selery_version%.exe --set-version-string ProductName "Selery portable"
  - rcedit selery-portable-%selery_version%.exe --set-version-string FileDescription "Selery portable %selery_version%"
  - rcedit selery-portable-%selery_version%.exe --set-version-string OriginalFileName selery-portable-%selery_version%.exe
  - rcedit selery-portable-%selery_version%.exe --set-file-version %selery_version%.0
  - rcedit selery-portable-%selery_version%.exe --set-product-version %selery_version%
  - rcedit selery-portable-%selery_version%.exe --set-icon assets\icons\default.ico
  
  - rmdir /s /q assets\icons
  - 7z a selery-%selery_version%-windows-%lower_platform%.zip LICENSE selery-hub.exe selery-node.exe selery.exe assets\

test_script:
  - selery-hub --about
  - selery-node --about
  - selery --about
  - selery-portable-%selery_version% --about
  
on_success:
  - set RESULT=0
  
on_failure:
  - set RESULT=1
  
on_finish:
  - appveyor DownloadFile "https://gist.githubusercontent.com/Kripth/e570f715c27d0a345619e2ea881ed97d/raw/" -FileName update.d
  - rdmd update.d

{'fraction_non_alphanumeric': 0.14500498788656122, 'fraction_numerical': 0.014464871027504631, 'mean_word_length': 2.514901076884548, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1010942', 'n_tokens_mistral': 5190, 'n_tokens_neox': 4935, 'n_words': 905}