From aee43791adb8a1e3d7c79b662722e6c2bf1a84cf Mon Sep 17 00:00:00 2001 From: PresentKim Date: Fri, 20 Sep 2019 23:41:50 +0900 Subject: [PATCH] AppVeyor : Set nodejs version to 12 arccoding to https://github.com/appveyor/ci/issues/2921#issuecomment-498018341 --- appveyor.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 52ed476..63053e5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,6 +27,8 @@ clone_depth: 5 # environment variables environment: + nodejs_version: "12" + platform: "x86" GIT_USER_EMAIL: debe3721@gmail.com GIT_USER_NAME: PresentKim GIT_USER_TOKEN: @@ -50,9 +52,14 @@ init: # scripts that run after cloning repository install: - # install nodejs > v12 - - curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - - - sudo apt-get install -y nodejs + # install nodejs version 12.x + - ps: | + try { + Install-Product node $env:nodejs_version $env:platform + } catch { + echo "Unable to install node $env:nodejs_version, trying update..." + Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform + } # install npm - npm install --global npm@latest # install hexo-cli to global