This repository has been archived by the owner on May 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upd - Added the push scripts and used them
- Loading branch information
Showing
3 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@echo off | ||
set apikey=%1 | ||
|
||
REM This script pushes. Use when you have VS installed. | ||
echo Pushing... | ||
cmd /C "forfiles /s /m *.nupkg /p ..\ /C "cmd /c dotnet nuget push @path --api-key %apikey% --source "nuget.org""" | ||
if %errorlevel% == 0 goto :success | ||
echo There was an error trying to push (%errorlevel%). | ||
goto :finished | ||
|
||
:success | ||
echo Push successful. | ||
:finished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
# This script pushes. Use when you have dotnet installed. | ||
releaseconf=$1 | ||
if [ -z $releaseconf ]; then | ||
releaseconf=Release | ||
fi | ||
|
||
# Check for dependencies | ||
dotnetpath=`which dotnet` | ||
if [ ! $? == 0 ]; then | ||
echo dotnet is not found. | ||
exit 1 | ||
fi | ||
|
||
# Push packages | ||
echo Pushing packages... | ||
find .. -type f -path "*/bin/$releaseconf/*.nupkg" -exec dotnet nuget push {} --api-key $NUGET_APIKEY --source "nuget.org" \; | ||
if [ ! $? == 0 ]; then | ||
echo Push failed. | ||
exit 1 | ||
fi | ||
|
||
# Inform success | ||
echo Push successful. | ||
exit 0 |