Skip to content

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

Merged
merged 2 commits into from
Apr 4, 2018

Conversation

fredericDelaporte
Copy link
Member

@fredericDelaporte fredericDelaporte commented Mar 17, 2018

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.

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"/>
Copy link
Member Author

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"/>
Copy link
Member Author

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"/>
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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.
@fredericDelaporte
Copy link
Member Author

Rebased and NuGet url simplified.

@hazzik
Copy link
Member

hazzik commented Apr 4, 2018

@fredericDelaporte could you please give more descriptive title to the PR?

@fredericDelaporte fredericDelaporte changed the title Release fix Fix NuGet push script Apr 4, 2018
@fredericDelaporte fredericDelaporte merged commit 6e17b76 into nhibernate:master Apr 4, 2018
@fredericDelaporte fredericDelaporte deleted the releaseFix branch April 4, 2018 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants