views:

74

answers:

1

I wonder if it is possible to use nupack to only store references to the required packages in version control (only the package.config and ignore the packages folder).

Is there a way to tell nupack to (re)download all the referenced packages in the various package.config files? Or something similar which could be put into a build script.

Update:

Seems that I'm not the only one who requested this feature: See this work item (thanks to PHeiberg for the hint)

+2  A: 

I don't know about your first question.

As for having a CI server automatically update the packages, it's doable in theory. You could chain the "List-Package -Installed" and the "Update-Package" commands and have each package updated to the latest version. See the command reference for further details.

Scott Guthrie says this on the topic:

"You can integrate the command-line option with a CI solution and do an update-package command explicitly as part of your build/CI process to pull down updates. Frankly I'm not sure that makes sense for the scenarios we are talking about, though, as typically you want some dev to decide before updating a core runtime dependency to a new version. NuPack's default model would have a developer use NuPack to install a library - and NuPack would automatically check in the package and dependencies to source control. That way another dev (or the CI server) wouldn't need to use NuPack again - they could just sync their source and build. But as I mentioned earlier - if you wanted to explicitly do an update as part of your CI process you could."

Edit:

After your comment I see what you're trying to achieve. I found this long thread in the NuPack discussions list about the issue. A solution will apparently not be part of v1. A custom build task in the CI of your choice and a config in your repo for it is the only solution I see. Please report back with your findings. You got me interested.

PHeiberg
Well I don't want the latest version, I want the specified one - I just don't want the binaries in the repository (as it bloats the repository size of a DCVS repository with each new version considerably)
Fionn
Ok, that kind of makes sense. You could stick a list of package names and versions in the repository and then have your CI fetch each of those with an "Add-Package -Version" command.
PHeiberg
Found a recent discussion on this. See my edit.
PHeiberg
Thanks for the link, if i find something I'll post it here. Meanwhile I will leave this question open until a solution is found.
Fionn