[pmwiki-users] Proposal: version control for cookbooks recipes

Patrick R. Michaud pmichaud at pobox.com
Tue Oct 24 17:50:19 CDT 2006


On Wed, Oct 25, 2006 at 12:26:45AM +0200, Dominique Faure wrote:
> On 10/25/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >
> >I've been formulating a scheme whereby one could use pmwiki.org's
> >Site.Analyzer tool (or something like it) to quickly determine
> >which recipes on a site are out of date.
> >
> 
> We'll need then to declare our recipes into a centralized information
> repository such as below, no?
> 
>  $RecipeInfo['MyRecipeName'] = array(
>  'version' => '20061025',
>  #...
>  );
> 
> So, could you provide us some specifications there, aka the recipe to
> write recipes [1].

I was thinking of calling the array $Cookbook, but I think I like
$RecipeInfo better.

So, let's just start with that as a minimal specification and 
we can build on it later as we need to.  Thus, the minimum a cookbook
script should provide is:

   $RecipeInfo['RecipeName']['Version'] = '20061025';

By default, 'RecipeName' here means that the recipe can be
found at the Cookbook.RecipeName page on pmwiki.org.  Later, if/when
we need it, we'll designate other entries in the array that can
specify a different location by url or pagename, as in:

   $RecipeInfo['RecipeName'] = array(
     'Version' => '20061025',
     'page' => 'Cookbook.RecipeName2',
     );

The format of the version number string is entirely up to 
the recipe author -- however, it should correspond to the
"Version:" line on the recipe's cookbook page.  In other words,
the value of {Cookbook.RecipeName$:Version} on pmwiki.org
should match what's entered in the array above (this is
likely how the automatic tools will determine if a 
locally installed recipe is up-to-date).

Pm




More information about the pmwiki-users mailing list