Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
version:
description: "The version of Dashcam to install. See releases here: https://github.com/replayableio/replayable/releases"
required: true
cli-version:
description: "The version of Dashcam cli to install. see: https://www.npmjs.com/package/dashcam?activeTab=versions"
required: false
default: "latest"
node-version:
description: "The version of Node.js to install. Must match the required version for cli see: https://github.com/replayableio/cli/blob/main/package.json"
required: true
Expand Down Expand Up @@ -44,7 +48,7 @@ runs:
Write-Host "Installing Dashcam CLI on ${{ runner.os }}"

$env:PATH = "$env:GITHUB_ACTION_PATH\src\windows;${{ inputs.node-directory }};${{ inputs.node-prefix }};$env:PATH"
Install-DashcamCLI.ps1
Install-DashcamCLI.ps1 -Version ${{ inputs.cli-version }}
Add-Content -Path $env:GITHUB_ENV -Encoding utf8 -Value "DASHCAM_NODE_DIR=${{ inputs.node-directory }}"

- name: Install Dashcam GUI (macOS)
Expand Down
9 changes: 8 additions & 1 deletion src/windows/Install-DashcamCLI.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
param (
[Parameter(Mandatory = $true)]
[string]$Version
)

$global:ErrorActionPreference = "Stop"
$global:ProgressPreference = "SilentlyContinue"
Set-StrictMode -Version Latest

& npm install --location=global dashcam
Write-Host "Installing Dashcam CLI $Version..."

& npm install --location=global dashcam@$Version

Write-Host "Verifying Dashcam CLI Install..."
& dashcam --help
Expand Down
Loading