Skip to content

Instantly share code, notes, and snippets.

@vhoyer
Created April 17, 2018 17:02
Show Gist options
  • Save vhoyer/17cbedfb781f35901a53c9a7386162cc to your computer and use it in GitHub Desktop.
Save vhoyer/17cbedfb781f35901a53c9a7386162cc to your computer and use it in GitHub Desktop.
#!/bin/bash
nuget.exe sources Add -Name "<Source Name>" -Source "<Sorce link>" -username "abcd" -password "****"
<?xml version="1.0"?>
<package >
<metadata>
<id>replaceme</id>
<version>1.0.0</version>
<authors>-</authors>
<owners>-</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>-</description>
<copyright>Copyright 2018</copyright>
</metadata>
</package>
#!/bin/bash
while (( "$#" )); do
DLLNAME=$1
SPECNAME="$1.nuspec"
NUPKG="$DLLNAME.1.0.0.nupkg"
cat default.nuspec > $SPECNAME
sed -i "s/replaceme/"$DLLNAME"/g" $SPECNAME
mkdir -p lib/
mv $1 lib/
./nuget.exe pack $SPECNAME
./nuget.exe push -Source "<Source Name>" -ApiKey VSTS $NUPKG
rm $NUPKG
rm $SPECNAME
rm lib/*
shift
done
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment