Edgewall Software
Modify

Opened 14 years ago

Last modified 12 years ago

#641 new enhancement

Allow conditionals in Bitten recipes

Reported by: lowjoel@… Owned by:
Priority: minor Milestone:
Component: Recipe commands Version:
Keywords: conditional Cc: felix.schwarz@…, james.e.harrison@…, techtonik@…, srl@…
Operating System:

Description

Perhaps allowing the conditional execution of build steps or indeed, step actions would be a useful addition to recipe parsing, especially when one uses Bitten on multiple environments. Using platform-specific conditional commands, e.g if on most Linux shells vs. cmd's if on Windows uses (slightly?) different syntax and may not be completely portable.

Attachments (0)

Change History (6)

comment:1 Changed 14 years ago by osimons

See also the onerror="strip" idea of #623. It allows you to define all steps, and if any error is raised for any reason (accident or intention) the step is just skipped and its presence in the build stripped away in any reporting.

comment:2 Changed 14 years ago by Joel Low <lowjoel@…>

#623 seems to only deal with error handling. I was thinking of something more flexible:

<if:equals lhs="${someVar}" rhs="someValue">
    <sh:exec file="whatever" args="whatever"/>
</if>

With more expressive syntax for Boolean operators etc. This isn't really important for the immediate release, but probably would be something nice to think about in the longer term.

comment:3 Changed 14 years ago by Felix Schwarz <felix.schwarz@…>

  • Cc felix.schwarz@… added

Also to me #623 is not the same – for example I'd like to have an attachment uploaded only if this is a release version (which I can test by checking the version number string).

comment:4 Changed 14 years ago by james.e.harrison@…

  • Cc james.e.harrison@… added

Our use of Bitten involves cross compiling code, and then copying the code to another (different architecture) machine, and executing tests.

This is done with a "reserved" machine, but the ability to have conditionals in recipes would be a great benefit.

comment:5 Changed 13 years ago by anatoly techtonik <techtonik@…>

  • Cc techtonik@… added

I'd add skipif attribute to the <step> tag. There might be some code for it in #669

comment:6 Changed 12 years ago by Steven R. Loomis <srl@…>

  • Cc srl@… added

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.