Permalink
Browse files

Improve deploynuget

  • Loading branch information...
sebastienros committed Oct 17, 2016
1 parent 0212f28 commit 7d52d6cc12345a281a38c6de855c653b5cd32406
Showing with 9 additions and 5 deletions.
  1. +9 −5 deploynuget.ps1
View
@@ -1,9 +1,13 @@
-if(![System.IO.File]::Exists("./.nuget/nuget.exe")){
- # file with path $path doesn't exist
+$projectjson = ".\jint\project.json"
+
+if(![System.IO.File]::Exists(".\.nuget\nuget.exe")){
+ New-Item ".nuget" -type directory
+ Invoke-WebRequest -Uri "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile "./.nuget/nuget.exe"
}
-Invoke-WebRequest -Uri "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile "./.nuget/nuget.exe"
+if([System.IO.File]::Exists("./artifacts")){
+ Remove-Item .\artifacts -Force -Recurse
+}
-Remove-Item .\artifacts -Force -Recurse
-dotnet pack .\src\Esprima\project.json -c Release -o .\artifacts
+dotnet pack $projectjson -c Release -o .\artifacts
.\.nuget\nuget.exe push .\artifacts\*.nupkg -Source nuget.org -ApiKey $nugetApiKey

0 comments on commit 7d52d6c

Please sign in to comment.