-
Notifications
You must be signed in to change notification settings - Fork 934
Fix NuGet push script #1618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NuGet push script #1618
Conversation
default.build
Outdated
</items> | ||
</in> | ||
<do> | ||
<echo message="nuget push ${filename} ${environment::newline()}" file="${nuget.nupackages.pushbatfile}" append="true"/> | ||
<echo message="nuget push -source https://api.nuget.org/v3/index.json ${path::get-file-name(filename)} ${environment::newline()}" file="${nuget.nupackages.pushbatfile}" append="true"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Destination ("source") is become mandatory. Documentation uses this v3 url, aligning on it.
Adding also path::get-file-name
because otherwise this was emitting the full path to the package, which is specific to the build machine and will very likely not be right after having downloaded the artifacts from TeamCity.
@@ -319,10 +319,21 @@ | |||
<in> | |||
<items> | |||
<include name="${nuget.nupackages.dir}/*.nupkg"/> | |||
<exclude name="${nuget.nupackages.dir}/*.symbols.nupkg"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to having to specify the destination, symbols package needs now a different command line.
default.build
Outdated
</items> | ||
</in> | ||
<do> | ||
<echo message="nuget push ${filename} ${environment::newline()}" file="${nuget.nupackages.pushbatfile}" append="true"/> | ||
<echo message="nuget push -source https://api.nuget.org/v3/index.json ${path::get-file-name(filename)} ${environment::newline()}" file="${nuget.nupackages.pushbatfile}" append="true"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I recall: https://nuget.org/
should be enough to push. Also, if it is just nuget.org the symbols would be pushed automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will test this on NHibernate.Caches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not push symbols package. This feature has been removed. NuGet/Home#6113
And cease specifying full package path, as the bat is likely to be executed from another folder than the CI build machine path.
e453df0
to
da59cf5
Compare
Rebased and NuGet url simplified. |
@fredericDelaporte could you please give more descriptive title to the PR? |
The nuget push bat is generating obsolete command lines which are no more accepted by NuGet.
The release procedure is lacking a point and has a typo.