parameters: - name: VSCODE_BUILD_MACOS type: boolean - name: VSCODE_BUILD_MACOS_ARM64 type: boolean steps: - task: NodeTool@0 inputs: versionSpec: "16.x" - script: node build/setup-npm-registry.js $NPM_REGISTRY build condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Registry - script: | set -e npm config set registry "$NPM_REGISTRY" --location=project npm config set always-auth=true --location=project yarn config set registry "$NPM_REGISTRY" workingDirectory: build condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM & Yarn - task: npmAuthenticate@0 inputs: workingFile: build/.npmrc condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Authentication - script: | set -e for i in {1..5}; do # try 5 times yarn --frozen-lockfile --check-files && break if [ $i -eq 3 ]; then echo "Yarn failed too many times" >&2 exit 1 fi echo "Yarn failed $i, trying again..." done workingDirectory: build displayName: Install build dependencies - template: ../cli/cli-darwin-sign.yml parameters: VSCODE_CLI_ARTIFACTS: - ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}: - unsigned_vscode_cli_darwin_x64_cli - ${{ if eq(parameters.VSCODE_BUILD_MACOS_ARM64, true) }}: - unsigned_vscode_cli_darwin_arm64_cli