@@ -57,28 +57,26 @@ function Validate-Directory ($output) {
57
57
New-Item $output - ItemType Directory - Force
58
58
}
59
59
60
- function Pack-Nuget ($path , $version , $output ) {
60
+ function Pack-Plugin ($path , $output ) {
61
61
Write-Host " Begin build nuget library"
62
62
63
- $spec = " $path \Scripts\flowlauncher.plugin.nuspec"
64
- Write-Host " nuspec path: $spec "
63
+ $project = " $path \Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj"
64
+
65
+ Write-Host " Packing: $project "
65
66
Write-Host " Output path: $output "
66
67
67
- Nuget pack $spec - Version $version - OutputDirectory $output
68
+ dotnet pack $project -- include - symbols -- configuration Release -- output $output
68
69
69
70
Write-Host " End build nuget library"
70
71
}
71
72
72
73
function Zip-Release ($path , $version , $output ) {
73
74
Write-Host " Begin zip release"
74
75
75
- $input = " $path \Output\Release"
76
- Write-Host " Input path: $input "
77
- $file = " $output \Flow.Launcher-$version .zip"
78
- Write-Host " Filename: $file "
76
+ $content = " $path \Output\Release\*"
77
+ $zipFile = " $output \Flow.Launcher-$version .zip"
79
78
80
- [Reflection.Assembly ]::LoadWithPartialName(" System.IO.Compression.FileSystem" )
81
- [System.IO.Compression.ZipFile ]::CreateFromDirectory($input , $file )
79
+ Compress-Archive - Force - Path $content - DestinationPath $zipFile
82
80
83
81
Write-Host " End zip release"
84
82
}
@@ -88,10 +86,12 @@ function Pack-Squirrel-Installer ($path, $version, $output) {
88
86
Write-Host " Begin pack squirrel installer"
89
87
90
88
$spec = " $path \Scripts\flowlauncher.nuspec"
91
- Write-Host " nuspec path: $spec "
92
89
$input = " $path \Output\Release"
90
+
91
+ Write-Host " Packing: $spec "
93
92
Write-Host " Input path: $input "
94
- Nuget pack $spec - Version $version - Properties Configuration= Release - BasePath $input - OutputDirectory $output
93
+ # TODO: can we use dotnet pack here?
94
+ nuget pack $spec - Version $version - BasePath $input - OutputDirectory $output - Properties Configuration= Release
95
95
96
96
$nupkg = " $output \FlowLauncher.$version .nupkg"
97
97
Write-Host " nupkg path: $nupkg "
@@ -139,12 +139,11 @@ function Main {
139
139
$o = " $p \Output\Packages"
140
140
Validate- Directory $o
141
141
# making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced.
142
- New-Alias Nuget $env: USERPROFILE \.nuget\packages\NuGet.CommandLine\5.4 .0 \tools\NuGet.exe - Force
143
142
Pack- Squirrel- Installer $p $v $o
144
143
145
144
$isInCI = $env: APPVEYOR
146
145
if ($isInCI ) {
147
- Pack- Nuget $p $v $o
146
+ Pack- Plugin $p $o
148
147
Zip- Release $p $v $o
149
148
}
150
149
0 commit comments