Skip to content

Commit

Permalink
Merge pull request #4238 from schleupen/alias-support
Browse files Browse the repository at this point in the history
add alias support
  • Loading branch information
forki authored Jan 15, 2024
2 parents 545d005 + ebb03f8 commit cc14492
Show file tree
Hide file tree
Showing 2 changed files with 509 additions and 498 deletions.
10 changes: 9 additions & 1 deletion src/Paket.Core/Installation/RestoreProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ let createProjectReferencesFiles (lockFile:LockFile) (projectFile:ProjectFile) (
let combinedCopyLocal = combineCopyLocal resolvedPackage.Settings packageSettings
let combinedOmitContent = combineOmitContent resolvedPackage.Settings packageSettings
let combinedImportTargets = combineImportTargets resolvedPackage.Settings packageSettings
let aliases = if direct then packageSettings.Settings.Aliases |> Seq.tryHead else None

let privateAssetsAll =
match combinedCopyLocal with
| Some true -> "true"
Expand All @@ -465,6 +467,11 @@ let createProjectReferencesFiles (lockFile:LockFile) (projectFile:ProjectFile) (
match combinedImportTargets with
| Some false -> "false"
| _ -> "true"

let alias =
match aliases with
| Some(x) -> x.Value
| _ -> ""
let line =
[ packageName.ToString()
package.Version.ToString()
Expand All @@ -473,7 +480,8 @@ let createProjectReferencesFiles (lockFile:LockFile) (projectFile:ProjectFile) (
privateAssetsAll
copyLocal
omitContent
importTargets ]
importTargets
alias]
|> String.concat ","

list.Add line
Expand Down
Loading

0 comments on commit cc14492

Please sign in to comment.