|
6 | 6 | Two modes of operation: |
7 | 7 |
|
8 | 8 | Pack mode (one or more source paths provided): |
9 | | - Packs local checkouts of liblcm, libpalaso, and/or chorus into the |
| 9 | + Packs local checkouts of liblcm, libpalaso, chorus, and/or machine into the |
10 | 10 | local NuGet feed using each library's own version. Detects the version |
11 | 11 | from produced packages, updates SilVersions.props to match, copies |
12 | 12 | PDBs, and clears stale cached packages. |
|
44 | 44 | Path to a local chorus checkout. Overrides LIBCHORUS_PATH env var. |
45 | 45 | Only used when -Chorus is specified. |
46 | 46 |
|
| 47 | +.PARAMETER Machine |
| 48 | + Switch: include SIL.Machine in the pack operation. |
| 49 | +
|
| 50 | +.PARAMETER MachinePath |
| 51 | + Path to a local machine checkout. Overrides SILMACHINE_PATH env var. |
| 52 | + Only used when -Machine is specified. |
| 53 | +
|
47 | 54 | .PARAMETER Library |
48 | 55 | Which library to set a version for (SetVersion mode only): |
49 | | - liblcm, libpalaso, or chorus. |
| 56 | + liblcm, libpalaso, chorus, or machine. |
50 | 57 |
|
51 | 58 | .PARAMETER Version |
52 | 59 | Sets the version in SilVersions.props (SetVersion mode). Use to revert |
@@ -75,7 +82,10 @@ param( |
75 | 82 | [switch]$Chorus, |
76 | 83 | [string]$ChorusPath, |
77 | 84 |
|
78 | | - [ValidateSet('liblcm', 'libpalaso', 'chorus')] |
| 85 | + [switch]$Machine, |
| 86 | + [string]$MachinePath, |
| 87 | + |
| 88 | + [ValidateSet('liblcm', 'libpalaso', 'chorus', 'machine')] |
79 | 89 | [string]$Library, |
80 | 90 |
|
81 | 91 | [string]$Version |
@@ -110,10 +120,16 @@ $LibraryConfig = @{ |
110 | 120 | CachePrefixes = @('sil.chorus') |
111 | 121 | EnvVar = 'LIBCHORUS_PATH' |
112 | 122 | } |
| 123 | + machine = @{ |
| 124 | + VersionProperty = 'SilMachineVersion' |
| 125 | + PdbRelativeDir = 'bin/Debug/netstandard2.0' |
| 126 | + CachePrefixes = @('sil.machine') |
| 127 | + EnvVar = 'SILMACHINE_PATH' |
| 128 | + } |
113 | 129 | } |
114 | 130 |
|
115 | 131 | # Pack order: libpalaso first (other libraries may depend on it) |
116 | | -$PackOrder = @('libpalaso', 'liblcm', 'chorus') |
| 132 | +$PackOrder = @('libpalaso', 'liblcm', 'chorus', 'machine') |
117 | 133 |
|
118 | 134 | # --------------------------------------------------------------------------- |
119 | 135 | # Read SilVersions.props |
@@ -301,6 +317,7 @@ $switchMap = @{ |
301 | 317 | libpalaso = @{ Enabled = [bool]$Palaso; ExplicitPath = $PalasoPath } |
302 | 318 | liblcm = @{ Enabled = [bool]$Lcm; ExplicitPath = $LcmPath } |
303 | 319 | chorus = @{ Enabled = [bool]$Chorus; ExplicitPath = $ChorusPath } |
| 320 | + machine = @{ Enabled = [bool]$Machine; ExplicitPath = $MachinePath } |
304 | 321 | } |
305 | 322 |
|
306 | 323 | # Resolve source paths: explicit path > env var (only when switch is set) |
@@ -387,5 +404,5 @@ elseif ($Library -and $Version) { |
387 | 404 | Write-Host "Run .\build.ps1 to restore and build with the new version." -ForegroundColor Cyan |
388 | 405 | } |
389 | 406 | else { |
390 | | - throw "Nothing to do. Use -Palaso/-Lcm/-Chorus switches to pack, or -Library and -Version to set a version.`nExamples:`n .\Build\Manage-LocalLibraries.ps1 -Palaso -PalasoPath C:\Repos\libpalaso`n .\Build\Manage-LocalLibraries.ps1 -Palaso -Chorus`n .\Build\Manage-LocalLibraries.ps1 -Library libpalaso -Version 17.0.0" |
| 407 | + throw "Nothing to do. Use -Palaso/-Lcm/-Chorus/-Machine switches to pack, or -Library and -Version to set a version.`nExamples:`n .\Build\Manage-LocalLibraries.ps1 -Palaso -PalasoPath C:\Repos\libpalaso`n .\Build\Manage-LocalLibraries.ps1 -Palaso -Chorus`n .\Build\Manage-LocalLibraries.ps1 -Machine -MachinePath C:\Repos\machine`n .\Build\Manage-LocalLibraries.ps1 -Library libpalaso -Version 17.0.0" |
391 | 408 | } |
0 commit comments