Files
modern-cv/scripts/install_package_locally.ps1
Paul T d4ba30d3f2 chore: read version from toml when installing package locally
Updated script to read the package version from the toml file
2024-04-01 06:26:47 -07:00

11 lines
537 B
PowerShell

# requires the PSToml cmdlet to be installed
# https://github.com/jborean93/PSToml?tab=readme-ov-file
# Install-Module -Name PSToml -Scope AllUsers
$typst_toml = ConvertFrom-Toml (Get-Content "$PSScriptRoot/../typst.toml" -Raw)
Write-Host 'Package version: ' $typst_toml.package.version
$Source = "$PSScriptRoot/../*"
$Destination = "$env:LOCALAPPDATA/typst/packages/local/modern-cv/$($typst_toml.package.version)"
New-Item -ItemType Directory -Path $Destination -Force
Copy-Item -Path $Source -Destination $Destination -Recurse -Force