File: pushnuget.sh

package info (click to toggle)
libcsfml 2.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,176 kB
  • sloc: cpp: 6,052; ansic: 2,530; sh: 790; makefile: 8
file content (21 lines) | stat: -rwxr-xr-x 480 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# Automatically exit on error
set -e

if [ -z "$1" ]; then
    echo "Specify the NuGet API Key as a parameter to this script"
    exit 1
fi

dotnet build -c Release

# Find every file that matches the glob ./*/bin/Release/*.nupkg
# and push it to nuget.org using the key specified as a parameter
# to this script

find \
    -type f \
    -regex "\./\w+/bin/Release/[^/]+\.nupkg" \
    -exec dotnet nuget push -k "$1" -s "https://api.nuget.org/v3/index.json" "{}" ";"