<commit_before>environment:
  matrix:
    - nodejs_version: "5.9.1"

platform:
  - x64

install:
  - ps: Install-Product node $env:nodejs_version $env:platform
  - node -v
  - npm install -g npm
  - npm install -g nw-gyp node-pre-gyp
  - npm install

test_script:
  - npm test

build: off

after_test:
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] rd /s /q %APPDATA%\..\Local\NuGet\Cache
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] choco install -y 7zip InnoSetup
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set PATH="C:\Program Files\7-Zip";"C:\Program Files (x86)\Inno Setup 5";%PATH%
  # GUI Version
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set SRC=%cd%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] echo %SRC%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy misc\MSVSVersion.py %APPDATA%\npm\node_modules\nw-gyp\gyp\pylib\gyp\MSVSVersion.py
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set NW_VERSION=0.13.0-rc3
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set NW_RELEASE=v0.13.0-rc3
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] echo %NW_RELEASE%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd node_modules/wotb
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm install --build-from-source
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\wotb.node %cd%\lib\binding\Release\node-v47-win32-x64\wotb.node /Y
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ../naclb
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm install --build-from-source
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\naclb.node %cd%\lib\binding\Release\node-v47-win32-x64\naclb.node /Y
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ../scryptb
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm install --build-from-source
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\scryptb.node %cd%\lib\binding\Release\node-v47-win32-x64\scryptb.node /Y
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ../sqlite3b
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm install --build-from-source
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\node_sqlite3.node %cd%\lib\binding\Release\node-v47-win32-x64\node_sqlite3.node /Y
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ../..
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] npm prune --production
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] cd ..
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] mkdir duniter_release
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set NW=nwjs-%NW_RELEASE%-win-x64
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] echo %NW%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set NW_GZ=%NW%.zip
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] echo %NW_GZ%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] curl -fS -o %NW_GZ% https://s3.eu-central-1.amazonaws.com/duniter/binaries/%NW_GZ%
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] 7z x %NW_GZ% 1> null
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %NW% %cd%\duniter_release\nw
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] mkdir %cd%\duniter_release\sources
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] xcopy %SRC%\gui\* %cd%\duniter_release\nw\ /s /e
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] xcopy %SRC%\* %cd%\duniter_release\sources\ /s /e
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] rd /s /q %cd%\duniter_release\sources\ui\package\node_modules
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] rd /s /q %cd%\duniter_release\sources\ui\package\bower_components
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] iscc %cd%\duniter_release\sources\duniter.iss /DROOT_PATH=%cd%\duniter_release
  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %cd%\duniter_release\Duniter.exe %cd%\duniter\duniter-%APPVEYOR_REPO_TAG_NAME%-windows-x64.exe

artifacts:
  - path: duniter*.exe
    name: Duniter

deploy:
  release: v0.20.0a64
  provider: GitHub
  auth_token:
    secure: <KEY>
  artifact: /Duniter/
  prerelease: true<commit_msg>Test upgrading to NW 0.14.5<commit_after>environment:
  matrix:
    - nodejs_version: "5.9.1"

platform:
  - x64

install:
  - ps: Install-Product node $env:nodejs_version $env:platform
  - node -v
  - npm install -g npm
  - npm install -g nw-gyp node-pre-gyp
  - npm install

test_script:
  - npm test

build: off

after_test:
  - rd /s /q %APPDATA%\..\Local\NuGet\Cache
  - choco install -y 7zip InnoSetup
  - set PATH="C:\Program Files\7-Zip";"C:\Program Files (x86)\Inno Setup 5";%PATH%
  # GUI Version
  - set SRC=%cd%
  - echo %SRC%
  - copy misc\MSVSVersion.py %APPDATA%\npm\node_modules\nw-gyp\gyp\pylib\gyp\MSVSVersion.py
  - set NW_VERSION=0.14.5
  - set NW_RELEASE=v0.14.5
  - echo %NW_RELEASE%
  - cd node_modules/wotb
  - npm install --build-from-source
  - node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\wotb.node %cd%\lib\binding\Release\node-v47-win32-x64\wotb.node /Y
  - cd ../naclb
  - npm install --build-from-source
  - node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\naclb.node %cd%\lib\binding\Release\node-v47-win32-x64\naclb.node /Y
  - cd ../scryptb
  - npm install --build-from-source
  - node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\scryptb.node %cd%\lib\binding\Release\node-v47-win32-x64\scryptb.node /Y
  - cd ../sqlite3b
  - npm install --build-from-source
  - node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure
  - node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build
  - copy %cd%\lib\binding\Release\node-webkit-%NW_RELEASE%-win32-x64\node_sqlite3.node %cd%\lib\binding\Release\node-v47-win32-x64\node_sqlite3.node /Y
  - cd ../..
  - npm prune --production
  - cd ..
  - mkdir duniter_release
  - set NW=nwjs-%NW_RELEASE%-win-x64
  - echo %NW%
  - set NW_GZ=%NW%.zip
  - echo %NW_GZ%
  - curl -fS -o %NW_GZ% https://s3.eu-central-1.amazonaws.com/duniter/binaries/%NW_GZ%
  - 7z x %NW_GZ% 1> null
  - move %NW% %cd%\duniter_release\nw
  - mkdir %cd%\duniter_release\sources
  - xcopy %SRC%\gui\* %cd%\duniter_release\nw\ /s /e
  - xcopy %SRC%\* %cd%\duniter_release\sources\ /s /e
  - rd /s /q %cd%\duniter_release\sources\ui\package\node_modules
  - rd /s /q %cd%\duniter_release\sources\ui\package\bower_components
  - iscc %cd%\duniter_release\sources\duniter.iss /DROOT_PATH=%cd%\duniter_release
  - move %cd%\duniter_release\Duniter.exe %cd%\duniter\duniter-%APPVEYOR_REPO_TAG_NAME%-windows-x64.exe

artifacts:
  - path: duniter*.exe
    name: Duniter

deploy:
  release: v0.20.0a64
  provider: GitHub
  auth_token:
    secure: <KEY>
  artifact: /Duniter/
  prerelease: true
{'fraction_non_alphanumeric': 0.16404410853673645, 'fraction_numerical': 0.02725808450006195, 'mean_word_length': 3.7122008172796264, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '7265844', 'n_tokens_mistral': 3757, 'n_tokens_neox': 3476, 'n_words': 562}