diff --git a/LICENSE b/LICENSE index 86d1b56946843064a1dda324903b8a3f2566728c..d19eeaa6706043c0762c1f94f14dd68930dea654 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2020 dotnet campus +Copyright (c) 2018-2022 dotnet campus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/dotnetCampus.SourceYard/Assets/Current/Core.targets b/src/dotnetCampus.SourceYard/Assets/Current/Core.targets index 45fececb320f17267f348343c8d21f50254bfce4..a54300d846d5792543c3f233cfa394301dc1587a 100644 --- a/src/dotnetCampus.SourceYard/Assets/Current/Core.targets +++ b/src/dotnetCampus.SourceYard/Assets/Current/Core.targets @@ -7,7 +7,8 @@ - <_SourceYardMultiTargetingPackageInfoFolder>$(BaseIntermediateOutputPath)$(Configuration)\SourceYardMultiTargetingPackageInfoFolder\ + <_SourceYardMultiTargetingPackageInfoFolder>$([System.IO.Path]::Combine($(BaseIntermediateOutputPath),$(Configuration),"SourceYardMultiTargetingPackageInfoFolder")) + - <_SourceYardMultiTargetingPackageInfoFile>$(_SourceYardMultiTargetingPackageInfoFolder)$(TargetFramework).txt + <_SourceYardMultiTargetingPackageInfoFile>$([System.IO.Path]::Combine($(_SourceYardMultiTargetingPackageInfoFolder),"$(TargetFramework).txt")) - $(IntermediateOutputPath)SourcePacking\ + $([System.IO.Path]::Combine($(BaseIntermediateOutputPath),$(IntermediateOutputPath),"SourcePacking")) - $(SourcePackingDirectory)CompileFile.txt - $(SourcePackingDirectory)ResourceFile.txt - $(SourcePackingDirectory)ContentFile.txt - $(SourcePackingDirectory)NoneFile.txt - $(SourcePackingDirectory)EmbeddedResourceFile.txt - $(SourcePackingDirectory)PageFile.txt - $(SourcePackingDirectory)ApplicationDefinitionFile.txt + $([System.IO.Path]::Combine($(SourcePackingDirectory),"CompileFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"ResourceFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"ContentFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"NoneFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"EmbeddedResourceFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"PageFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"ApplicationDefinitionFile.txt")) - $(SourcePackingDirectory)DescriptionFile.txt - $(SourcePackingDirectory)CopyrightFile.txt - $(SourcePackingDirectory)PackageReleaseNotesFile.txt + $([System.IO.Path]::Combine($(SourcePackingDirectory),"DescriptionFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"CopyrightFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"PackageReleaseNotesFile.txt")) - $(SourcePackingDirectory)PackageReferenceVersionFile.txt - $(SourcePackingDirectory)FrameworkReferenceVersionFile.txt - $(SourcePackingDirectory)SourceProjectPackageFile.txt - $(SourcePackingDirectory)SourceYardPackageReferenceFile.txt + $([System.IO.Path]::Combine($(SourcePackingDirectory),"PackageReferenceVersionFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"FrameworkReferenceVersionFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceProjectPackageFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardPackageReferenceFile.txt")) - $(SourcePackingDirectory)SourceYardExcludePackageReferenceFile.txt + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardExcludePackageReferenceFile.txt")) - $(SourcePackingDirectory)SourceYardExcludeFileItemFile.txt + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardExcludeFileItemFile.txt")) - $(SourcePackingDirectory)SourceYardCompilePackageFile.txt - $(SourcePackingDirectory)SourceYardResourcePackageFile.txt - $(SourcePackingDirectory)SourceYardContentPackageFile.txt - $(SourcePackingDirectory)SourceYardNonePackageFile.txt - $(SourcePackingDirectory)SourceYardEmbeddedResourcePackageFile.txt + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardCompilePackageFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardResourcePackageFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardContentPackageFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardNonePackageFile.txt")) + $([System.IO.Path]::Combine($(SourcePackingDirectory),"SourceYardEmbeddedResourcePackageFile.txt")) @@ -103,24 +104,24 @@ RepositoryUrl "$(RepositoryUrl)" RepositoryType "$(RepositoryType)" PackageProjectUrl "$(PackageProjectUrl)"--> - --PackageLicenseUrl "$(PackageLicenseUrl) " + --PackageLicenseUrl "$(PackageLicenseUrl)" --CopyrightFile "$(CopyrightFile)" -v $(PackageVersion) - --DescriptionFile "$(DescriptionFile) " + --DescriptionFile "$(DescriptionFile)" --Title "$(Title)" --Owner "$(Owner)" - --PackageTags "$(PackageTags) " + --PackageTags "$(PackageTags)" --PackageReleaseNotesFile $(PackageReleaseNotesFile) - --PackageId "$(PackageId) " + --PackageId "$(PackageId)" - -p "$(MSBuildProjectFullPath) " + -p "$(MSBuildProjectFullPath)" -n "$(PackageOutputPath) " - -n "$(OutputPath) " + -n "$(OutputPath) " @@ -199,7 +200,7 @@ + Command="$(SourceYardApplicationFilePath) $(SourceMSBuildProjectFullPath) $(SourcePackageOutputPath) $(SourceYardPackageVersion) $(SourceYardAuthors) $(SourceYardRepositoryUrl) $(SourceYardRepositoryType) $(SourceYardPackageProjectUrl) $(SourceYardCopyright) $(SourceYardDescription) $(SourceYardTitle) $(SourceYardPackageLicenseUrl) $(SourceYardPackageReleaseNotes) $(SourceYardPackageTags) $(SourceYardOwner) $(SourceYardPackageId) --TargetFrameworks "$(TargetFrameworks) " --TargetFramework "$(TargetFramework) " --MultiTargetingPackageInfoFolder "$(_SourceYardMultiTargetingPackageInfoFolder)""> @@ -211,7 +212,7 @@ - <_SourcePackingDirectory>$(IntermediateOutputPath)SourcePacking\ + <_SourcePackingDirectory>$([System.IO.Path]::Combine($(IntermediateOutputPath),"SourcePacking")) diff --git a/src/dotnetCampus.SourceYard/Cli/Options.cs b/src/dotnetCampus.SourceYard/Cli/Options.cs index 5b75d2b1ec0057a99e997b1056a4d676a1a640ea..d1979c04d38f66fff958b63ed49256cc1fca06fd 100644 --- a/src/dotnetCampus.SourceYard/Cli/Options.cs +++ b/src/dotnetCampus.SourceYard/Cli/Options.cs @@ -7,7 +7,7 @@ namespace dotnetCampus.SourceYard.Cli /// /// 项目文件所在的路径 /// - [Option('p', "project", Description = "The full path of the project file.")] + [Option('p', "Project", Description = "The full path of the project file.")] public string ProjectFile { get; set; } = null!; ///// @@ -19,13 +19,13 @@ namespace dotnetCampus.SourceYard.Cli /// /// 打包输出的文件夹 /// - [Option('n', "package-output-path", Description = "The package output full path of the project.")] + [Option('n', "PackageOutputPath", Description = "The package output full path of the project.")] public string PackageOutputPath { get; set; } = null!; /// /// 当前项目的打包版本 /// - [Option('v', "package-version", + [Option('v', "PackageVersion", // 默认不需要加上打包版本 Description = "The package version value.")] public string PackageVersion { get; set; } = "1.0.0"; diff --git a/src/dotnetCampus.SourceYard/Program.cs b/src/dotnetCampus.SourceYard/Program.cs index c63ace00d1f45ad0559506eca74b55fa00130912..770d9a3fc5463d7c2f072eba7fd1e9ac974cb936 100644 --- a/src/dotnetCampus.SourceYard/Program.cs +++ b/src/dotnetCampus.SourceYard/Program.cs @@ -93,6 +93,10 @@ namespace dotnetCampus.SourceYard // 安装的项目的兼容性无法处理?源代码包有 net45 框架,项目是 net47 框架,如何让项目能兼容使用到 net45 框架?当前没有此生成逻辑 var sourcePackingFolder = GetCommonSourcePackingFolder(multiTargetingPackageInfo, logger); var packageOutputPath = options.PackageOutputPath; + if (!string.IsNullOrEmpty(packageOutputPath)) + { + packageOutputPath = packageOutputPath.Trim(); + } var packageVersion = options.PackageVersion; // logger.Message($@"项目文件 {projectFile} diff --git a/src/dotnetCampus.SourceYard/dotnetCampus.SourceYard.csproj b/src/dotnetCampus.SourceYard/dotnetCampus.SourceYard.csproj index 67df9312c44ded24d0bef2aececdd49dad989f5e..c7b1dd62af966081d0c129ca5c976969b436a582 100644 --- a/src/dotnetCampus.SourceYard/dotnetCampus.SourceYard.csproj +++ b/src/dotnetCampus.SourceYard/dotnetCampus.SourceYard.csproj @@ -43,6 +43,9 @@ all runtime; build; native; contentfiles; analyzers + + +