Skip to content

Commit

Permalink
add alias support
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Hamm committed Dec 13, 2023
1 parent a704d68 commit ebb03f8
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 ebb03f8

Please sign in to comment.