2 Commits

Author SHA1 Message Date
5892210f9d Bump version to 0.0.5 2024-03-11 17:19:03 +01:00
4b40aa64b9 Fix root file link override 2024-03-11 17:05:29 +01:00
3 changed files with 13 additions and 6 deletions

4
.vscode/launch.json vendored
View File

@@ -10,8 +10,8 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Alma/bin/Debug/net7.0/Alma.dll",
"args": [],
"program": "${workspaceFolder}/src/Alma/bin/Debug/net8.0/Alma.dll",
"args": ["link", "dotconfig", "git", "-d"],
"cwd": "${workspaceFolder}/src/Alma",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",

View File

@@ -201,7 +201,14 @@ public class LinkCommand : RepositoryModuleCommandBase
var filesToLink = new List<ItemToLink>();
foreach (var file in currentDirectory.GetFiles())
{
filesToLink.Add(new ItemToLink(Path.Combine(currentDirectory.FullName, file.Name), Path.Combine(currentTargetDirectory.FullName, file.Name)));
if (moduleConfiguration?.Links?.ContainsKey(file.Name) ?? false)
{
filesToLink.Add(new ItemToLink(file.FullName, _pathHelperService.ResolvePath(moduleConfiguration.Links[file.Name], targetDirectory.FullName)));
}
else
{
filesToLink.Add(new ItemToLink(file.FullName, Path.Combine(currentTargetDirectory.FullName, file.Name)));
}
}
var subDirLinksToAdd = Enumerable.Empty<ItemToLink>();

View File

@@ -14,7 +14,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<VersionPrefix>0.0.4</VersionPrefix>
<VersionPrefix>0.0.5</VersionPrefix>
<VersionSuffix>development</VersionSuffix>
</PropertyGroup>