apenwarr / gitbuilder
- Source
- Commits
- Network (0)
- Issues (1)
- Downloads (2)
- Wiki (1)
- Graphs
-
Tree:
51d62f1
gitbuilder / build.sh.example
| 3e315c9f » | apenwarr | 2008-08-22 | 1 | #!/bin/bash -x | |
| 5e07d19f » | apenwarr | 2008-08-22 | 2 | # | |
| 3 | # Copy this file to build.sh so that gitbuilder can run it. | ||||
| 4 | # | ||||
| 5 | # What happens is that gitbuilder will checkout the revision of your software | ||||
| 6 | # it wants to build in the directory called gitbuilder/build/. Then it | ||||
| 7 | # does "cd build" and then "../build.sh" to run your script. | ||||
| 8 | # | ||||
| 9 | # You might want to run ./configure here, make, make test, etc. | ||||
| 10 | # | ||||
| 11 | |||||
| 12 | # Don't forget to run autoconf and ./configure, if that's what your project | ||||
| 13 | # needs. | ||||
| 8e06013c » | apenwarr | 2008-09-02 | 14 | [ ! -x autogen.sh ] || ./autogen.sh || exit 1 | |
| 3e315c9f » | apenwarr | 2008-08-22 | 15 | autoconf || true | |
| 8e06013c » | apenwarr | 2008-09-02 | 16 | [ ! -x configure ] || ./configure || exit 2 | |
| 5e07d19f » | apenwarr | 2008-08-22 | 17 | ||
| 18 | # Actually build the project | ||||
| 8e06013c » | apenwarr | 2008-09-02 | 19 | make || exit 3 | |
| 5e07d19f » | apenwarr | 2008-08-22 | 20 | ||
| 9e790ba1 » | apenwarr | 2008-09-02 | 21 | # Only run the unit tests if the 'make test' target exists. Make will | |
| 22 | # return 1 if a target exists but isn't up-to-date, or 2 on error. | ||||
| 23 | make -q tests | ||||
| 24 | if [ "$?" = 1 ]; then | ||||
| b84691b7 » | apenwarr | 2008-10-17 | 25 | # run "make test", but give it a time limit in case a test gets stuck | |
| 26 | ../maxtime 1800 make test || exit 4 | ||||
| 9e790ba1 » | apenwarr | 2008-09-02 | 27 | fi | |
| 5e07d19f » | apenwarr | 2008-08-22 | 28 | ||
| 8e06013c » | apenwarr | 2008-09-02 | 29 | exit 0 | |
