FubuMvcArchive / ripple

Super charged dependency management with Nuget without the merge hell
http://fubuworld.com/ripple
Other
45 stars 35 forks source link

Support placeholders as defined in nuspec specification #246

Open danielmarbach opened 10 years ago

danielmarbach commented 10 years ago
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
    <id>SomePackage</id>
    <version>$version$</version>
    <dependencies/> 
  </metadata>
  <files>
    <file src="..\..\binaries\$id$.dll" target="lib\net45" />
    <!--<file src="..\..\src\$id$\**\*.cs" target="src" />-->
  </files>  
</package>

http://docs.nuget.org/docs/reference/nuspec-reference

According to the reference placeholders like $version$ and $id$ can be used. When combined with ripple the ripple commands throw exceptions.

ripple: Error creating package: '$version$' is not a valid version string.
Parameter name: version
ripple: Error executing CreatePackages

ripple: Error creating package: File not found: '..\..\binaries\$id$.dll'.
ripple: Error executing CreatePackages
mavnn commented 10 years ago

This would also make translating existing NuGet based solutions to ripple much easier, as people moving across are likely to have (many) nuspec files with placeholders in.

Michael

On 22 November 2013 12:19, danielmarbach notifications@github.com wrote:

SomePackage $version$

http://docs.nuget.org/docs/reference/nuspec-reference

According to the reference placeholders like $version$ and $id$ can be used. When combined with ripple the ripple commands throw exceptions.

ripple: Error creating package: '$version$' is not a valid version string. Parameter name: version ripple: Error executing CreatePackages

ripple: Error creating package: File not found: '....\binaries\$id$.dll'. ripple: Error executing CreatePackages

— Reply to this email directly or view it on GitHubhttps://github.com/DarthFubuMVC/ripple/issues/246 .

jeremydmiller commented 10 years ago

For my edification, can you give us an example of how that's used?

mavnn commented 10 years ago

If you put something like this:

<?xml version="1.0"?>

$id$ $version$ Some title Me Mine Ltd false Stuff Copyright Me 2013

In a nuspec file, and the name of the file matches the name of one of your projects (i.e. My.Project.nuspec and My.Project.csproj), it will substitute values from the AssemblyInfo in for the "$" surrounded place holders. It will also assume that you want to put the contents of the bin folder into the relevant framework folder if you don't manually specify a block, but I'm not sure ripple would want to go there.

Michael

On 22 November 2013 14:05, Jeremy D. Miller notifications@github.comwrote:

For my edification, can you give us an example of how that's used?

— Reply to this email directly or view it on GitHubhttps://github.com/DarthFubuMVC/ripple/issues/246#issuecomment-29074357 .

jeremydmiller commented 10 years ago

I got you now, I didn't know about that. It's opposite of how we work. We have the build scripts push in the version, build the common assembly info on the fly, and push in the version to ripple local-nuget

danielmarbach commented 10 years ago

Wouldn't it be nice if ripple could leverage those placeholders and for example put in the stuff passed by console arguments?

mavnn commented 10 years ago

Or (speaking from personal convenience :) ) from a assembly info parses would be a good option for those of us converting NuGet based projects. We already know where the project files are, so it shouldn't be that difficult.

I'm even willing to put some time into making it happen, but only if Jeremy et al agree it's a desirable feature.

Michael

On 25 November 2013 07:56, danielmarbach notifications@github.com wrote:

Wouldn't it be nice if ripple could leverage those placeholders and for example put in the stuff passed by console arguments?

— Reply to this email directly or view it on GitHubhttps://github.com/DarthFubuMVC/ripple/issues/246#issuecomment-29182998 .