diff --git a/.gitmodules b/.gitmodules index f384b3e..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "CsharpNugetPush"] - path = CsharpNugetPush - url = https://github.com/tqk2811/CsharpNugetPush.git diff --git a/src/CsharpNugetPush/CsharpNugetPush.ps1 b/src/CsharpNugetPush/CsharpNugetPush.ps1 deleted file mode 100644 index f1e44a3..0000000 --- a/src/CsharpNugetPush/CsharpNugetPush.ps1 +++ /dev/null @@ -1,84 +0,0 @@ -param ( - [string]$buildIndex="00" -) -$workingDir = Get-Location -$dirInfo= New-Object -Typename System.IO.DirectoryInfo -ArgumentList ($workingDir) -$projectName= $dirInfo.Name; -$key=$env:nugetKey -$buildDay=[DateTime]::Now.ToString("yyyyMMdd") -$p="buildDay=$($buildDay);buildIndex=$($buildIndex)".Trim() -$build="Release" - -function RunCommand -{ - $numOfArgs = $args.Length - for ($i=0; $i -lt $numOfArgs; $i++) - { - iex $args[$i] - if($LASTEXITCODE -eq 0 -or $i -eq 0) { - Write-Host "$($args[$i]) success" - } - else{ - Write-Host "$($args[$i]) failed" - return 0 - } - } - return 1 -} - -function NugetPack -{ - $numOfArgs = $args.Length - for ($i=0; $i -lt $numOfArgs; $i++) - { - Write-Host "NugetPack $($args[$i])" - - $result = RunCommand "Remove-Item -Recurse -Force .\bin\$($build)\**" ` - "dotnet build .\$($args[$i]).csproj -c $($build)" ` - "nuget pack .\$($args[$i]).nuspec -Symbols -OutputDirectory .\bin\$($build) -p 'id=$($args[$i]);$($p)'" - - if($result) { - Write-Host "$($args[$i]) success" - } - else{ - Write-Host "$($args[$i]) failed" - return 0 - } - } - return 1 -} - -function NugetPush -{ - $numOfArgs = $args.Length - for ($i=0; $i -lt $numOfArgs; $i++) - { - Write-Host "NugetPush $($args[$i])" - - $files = [System.IO.Directory]::GetFiles(".\bin\$($build)\") - iex "nuget push $($files[0]) -ApiKey $($key) -Source https://api.nuget.org/v3/index.json" - } -} - -$result = NugetPack $projectName -if($result) -{ - if([string]::IsNullOrEmpty($key)) - { - Write-Host "Build & pack success" - } - else - { - Write-Host "enter to push nuget" - pause - Write-Host "enter to confirm" - pause - - NugetPush $projectName - } -} -else -{ - echo "Build & pack error" -} -pause \ No newline at end of file diff --git a/src/CsharpNugetPush/README.md b/src/CsharpNugetPush/README.md deleted file mode 100644 index 064825c..0000000 --- a/src/CsharpNugetPush/README.md +++ /dev/null @@ -1 +0,0 @@ -# CsharpNugetPush