Difference between revisions of "Autobuild Shell Functions"
Jump to navigation
Jump to search
m |
Rand Linden (talk | contribs) |
||
Line 1: | Line 1: | ||
Autobuild | {{Autobuild Nav}} | ||
Autobuild offers a set of shell functions for use in <code>build-cmd.sh</code> scripts which can be added to the environment by inserting the following line into any build script: | |||
<br clear=all/> | |||
<bash>eval "$("$AUTOBUILD" source_environment)"</bash> | <bash>eval "$("$AUTOBUILD" source_environment)"</bash> | ||
The exact shell code that is injected into your environment upon execution of this command [https://bitbucket.org/lindenlab/autobuild/src/tip/autobuild/autobuild_tool_source_environment.py is here]. | The exact shell code that is injected into your environment upon execution of this command [https://bitbucket.org/lindenlab/autobuild/src/tip/autobuild/autobuild_tool_source_environment.py is here]. | ||
== General functions == | |||
Shell functions provided by autobuild: | Shell functions provided by autobuild: | ||
{| border="1" class=lltable | |||
|- | |||
! Function | |||
! Description | |||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| | | pass | ||
| | | Indicates build has succeeded | ||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| | | fail $comment | ||
| | | Indicates build has failed, citing $comment in the output | ||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| | | fetch_archive $url $archive $md5 | ||
| | | Uses curl to download $archive from the $url and checks the downloaded file hash against the $md5 provided. | ||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| | | extract $file | ||
| | | Extracts contents of an archive appropriate for the tar extension of $file. | ||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| | | calc_md5 $file | ||
| | | Calculate the md5 of $file | ||
|} | |} | ||
== Windows-only commands == | |||
Windows-only shell commands (Cygwin): | Windows-only shell commands (Cygwin): | ||
{| border="1" class=lltable | |||
|- | |||
! Function | |||
! Description | |||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| | | build_vcproj $vcproj $config | ||
| | | Launches a Visual Studio build of $vcproj, building configuration $config. If $USE_INCREDIBUILD is set, the same build is launched via BuildConsole, Incredibuild's command-line launcher. | ||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| | | build_sln $sln $config $project | ||
| | | Launches a Visual Studio build using the solution file $sln, configuration $config, and specifying project $project. If $project is omitted, then the entire solution will be built. | ||
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
| | | load_vsvars | ||
| | | Import Visual Studio paths, includes and libs into the shell environment | ||
|} | |} | ||
[[Category:Autobuild]] | [[Category:Autobuild]] |
Revision as of 11:49, 8 March 2011
Autobuild offers a set of shell functions for use in build-cmd.sh
scripts which can be added to the environment by inserting the following line into any build script:
<bash>eval "$("$AUTOBUILD" source_environment)"</bash>
The exact shell code that is injected into your environment upon execution of this command is here.
General functions
Shell functions provided by autobuild:
Function | Description |
---|---|
pass | Indicates build has succeeded |
fail $comment | Indicates build has failed, citing $comment in the output |
fetch_archive $url $archive $md5 | Uses curl to download $archive from the $url and checks the downloaded file hash against the $md5 provided. |
extract $file | Extracts contents of an archive appropriate for the tar extension of $file. |
calc_md5 $file | Calculate the md5 of $file |
Windows-only commands
Windows-only shell commands (Cygwin):
Function | Description |
---|---|
build_vcproj $vcproj $config | Launches a Visual Studio build of $vcproj, building configuration $config. If $USE_INCREDIBUILD is set, the same build is launched via BuildConsole, Incredibuild's command-line launcher. |
build_sln $sln $config $project | Launches a Visual Studio build using the solution file $sln, configuration $config, and specifying project $project. If $project is omitted, then the entire solution will be built. |
load_vsvars | Import Visual Studio paths, includes and libs into the shell environment |