Edgewall Software
Modify

Opened 19 years ago

Closed 15 years ago

#122 closed enhancement (worksforme)

macro expansion in build recipes

Reported by: joel@… Owned by: cmlenz
Priority: major Milestone:
Component: General Version: 0.5.3
Keywords: Cc:
Operating System:

Description

I wanted a way to pass certain key information, like revision number, to the slave build process. In order to accomplish that, I have implemented certain macros that may be placed into the build recipe, and will then be expanded before sending it to the slave.

The specific macros implemented in this patch are:

%BUILD% = Build id number
%REVISION% = Revision
%PLATFORM% = Platform name
%TIME% = Revision time

This allows you to incorporate this important information into the build process. For example, if you wish to have the slave perform its own source code checkout, and you don't want to wait for Bitten 0.7, you could use this patch and then put these build steps into your recipe:

  <step id="remove_tarball" description="Remove Bitten's tarball">
    <sh:exec executable="rm" args="-r *"/>
  </step>

  <step id="checkout" description="Checkout source from SVN">
    <sh:exec executable="svn" args="svn co -r %REVISION% http://server/svn/repo/trunk ."/>
  </step>

Attachments (1)

bitten-macros.diff (746 bytes) - added by joel@… 19 years ago.
Patch to provide the macro expansion as described here

Download all attachments as: .zip

Change History (4)

Changed 19 years ago by joel@…

Patch to provide the macro expansion as described here

comment:1 Changed 19 years ago by joel@…

oops-- there's a slight error in my example recipe, it should read:

  <step id="remove_tarball" description="Remove Bitten's tarball">
    <sh:exec executable="rm" args="-r *"/>
  </step>

  <step id="checkout" description="Checkout source from SVN">
    <sh:exec executable="svn" args="co -r %REVISION% http://server/svn/repo/trunk ."/>
  </step>

Also, the * doesn't seem to get expanded in the sh:exec command, so the step of removing the tarball files will need to be reworked. (The files do need to be removed, otherwise the svn checkout will fail.)

comment:2 Changed 19 years ago by joel@…

For removing the extracted tarball, this will work:

  <step id="remove_tarball" description="Remove Bitten's tarball">
    <sh:exec executable="sh" args="-c 'rm -r *'"/>
  </step>

comment:3 Changed 15 years ago by osimons

  • Resolution set to worksforme
  • Status changed from new to closed

All these properties (except revision timestamp) are already available for use in recipes.

See Documentation/recipes.html and Documentation/configure.html

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cmlenz.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.