mirror of
https://github.com/Grace-Solutions/PSProxmox.git
synced 2026-07-26 08:18:19 +00:00
Include Newtonsoft.Json dependency in the module
This commit is contained in:
@@ -29,6 +29,7 @@ if (-not (Test-Path -Path "$modulePath\bin")) {
|
||||
# Copy the module files
|
||||
Copy-Item -Path "$rootPath\Module\PSProxmox.psd1" -Destination $modulePath -Force
|
||||
Copy-Item -Path "$rootPath\Module\bin\PSProxmox.dll" -Destination "$modulePath\bin" -Force
|
||||
Copy-Item -Path "$rootPath\Module\bin\Newtonsoft.Json.dll" -Destination "$modulePath\bin" -Force
|
||||
Copy-Item -Path "$rootPath\LICENSE" -Destination $modulePath -Force
|
||||
Copy-Item -Path "$rootPath\README.md" -Destination $modulePath -Force
|
||||
|
||||
|
||||
@@ -43,10 +43,20 @@ Copy-Item -Path "$rootPath\LICENSE" -Destination $releaseVersionDir -Force
|
||||
Copy-Item -Path "$rootPath\README.md" -Destination $releaseVersionDir -Force
|
||||
Copy-Item -Path "$scriptRoot\Install-PSProxmox.ps1" -Destination $releaseVersionDir -Force
|
||||
|
||||
# Make sure the bin directory exists in the release directory
|
||||
if (-not (Test-Path -Path "$releaseVersionDir\bin")) {
|
||||
New-Item -Path "$releaseVersionDir\bin" -ItemType Directory -Force | Out-Null
|
||||
Write-Host "Created bin directory in release: $releaseVersionDir\bin"
|
||||
}
|
||||
|
||||
# Copy the fully prepared module back to the Module directory
|
||||
Write-Host "Updating Module directory with built files..."
|
||||
Copy-Item -Path "$releaseBinDir\PSProxmox.dll" -Destination "$rootPath\Module\bin" -Force
|
||||
|
||||
# Copy dependencies to the Module directory
|
||||
Write-Host "Copying dependencies to Module directory..."
|
||||
Copy-Item -Path "$releaseBinDir\Newtonsoft.Json.dll" -Destination "$rootPath\Module\bin" -Force
|
||||
|
||||
# Create a ZIP file of the release
|
||||
$zipPath = "$releaseBaseDir\PSProxmox-$version.zip"
|
||||
Compress-Archive -Path "$releaseVersionDir\*" -DestinationPath $zipPath -Force
|
||||
|
||||
Reference in New Issue
Block a user