diff options
author | David Hendricks <dhendrix@chromium.org> | 2013-11-11 18:44:05 -0800 |
---|---|---|
committer | David Hendricks <dhendrix@chromium.org> | 2013-11-17 10:31:17 +0100 |
commit | 1b6e7a67489138848edfc641522297b0263b739c (patch) | |
tree | 1f70fa00d0753b59d1e3db71ab09357d45baacec /util/board_status/getrevision.sh | |
parent | 0dde01cad1c0b1422c845fc201733be559004fb7 (diff) |
Updates to the board status script
This is the first major re-work for the board status script.
Summary:
- Added a command to the getrevision.sh script to retrieve tagged
revision.
- Results are placed in a dynamically generated temporary location.
This makes it easy to do multiple trial runs and avoids polluting
the coreboot directory.
- Results are stored in a directory with the following form:
<vendor>/<mainboard>/<tagged_revision>/<timestamp>/
Vendor and mainboard are obtained from CONFIG_MAINBOARD_DIR so that
hierarchy is consistent between coreboot and board-status.
- The results directory is used as the commit message.
- board-status repository is checked out automatically if results are
to be uploaded.
TODO:
- Add ability to run commands which may fail. Currently we assume
any failure should terminate the script, but some commands can be
made optional.
Successfully uploaded first result to board-status repository. See
http://review.coreboot.org/gitweb?p=board-status.git;a=summary .
Change-Id: Icba41ccad4e6e6ee829b8092a2459c2d72a3365b
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/4039
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/board_status/getrevision.sh')
-rwxr-xr-x | util/board_status/getrevision.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/util/board_status/getrevision.sh b/util/board_status/getrevision.sh index c8c126a5ee..0a6b6c6923 100755 --- a/util/board_status/getrevision.sh +++ b/util/board_status/getrevision.sh @@ -121,6 +121,20 @@ local_revision() { echo "${r}" } +# Similar to local_revision but uses "git describe" instead of "git log" which +# includes number of commits since most recent tag. +tagged_revision() { + local r + + if git_is_file_tracked "$1" ; then + r=$(git describe --tags --dirty) + else + return ${EXIT_FAILURE} + fi + + echo "${r}" +} + upstream_revision() { local r= @@ -143,6 +157,8 @@ Commands local revision information including an indicator for uncommitted changes -u or --upstream upstream revision + -T or --tags + similar to -l, but uses \"git describe\" to obtain revision info with tags -U or --url URL associated with the latest commit -d or --date @@ -175,6 +191,10 @@ main() { check_action $1 action=local_revision shift;; + -T|--tags) + check_action $1 + action=tagged_revision + shift;; -u|--upstream) check_action $1 action=upstream_revision |