mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
fixup! Convert flashrom to git
Rename getrevision's local_revision function to just revision. All revisions are local in git and we certainly wont go back to a non-distributed VCS :) Change-Id: I6689ac24077b3981b471ed69de7cc3ef79d435b1 Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/21829 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
8eb1df69ab
commit
5bf6b855d4
2
Makefile
2
Makefile
@ -530,7 +530,7 @@ CLI_OBJS = cli_classic.o cli_output.o cli_common.o print.o
|
|||||||
# export rule. If versioninfo.inc is not found, version info will be obtained
|
# export rule. If versioninfo.inc is not found, version info will be obtained
|
||||||
# using util/getrevision.sh.
|
# using util/getrevision.sh.
|
||||||
ifeq ($(wildcard versioninfo.inc),)
|
ifeq ($(wildcard versioninfo.inc),)
|
||||||
VERSION ?= $(shell ./util/getrevision.sh --local)
|
VERSION ?= $(shell ./util/getrevision.sh --revision)
|
||||||
MAN_DATE ?= $(shell ./util/getrevision.sh --date $(PROGRAM).8.tmpl 2>/dev/null)
|
MAN_DATE ?= $(shell ./util/getrevision.sh --date $(PROGRAM).8.tmpl 2>/dev/null)
|
||||||
else
|
else
|
||||||
include versioninfo.inc
|
include versioninfo.inc
|
||||||
|
@ -130,8 +130,7 @@ timestamp() {
|
|||||||
echo "${t}"
|
echo "${t}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Retrieve local revision info.
|
revision() {
|
||||||
local_revision() {
|
|
||||||
local r
|
local r
|
||||||
if git_is_file_tracked "$1" ; then
|
if git_is_file_tracked "$1" ; then
|
||||||
r=$(git describe $(git_last_commit "$1"))
|
r=$(git describe $(git_last_commit "$1"))
|
||||||
@ -158,8 +157,9 @@ Commands
|
|||||||
this message
|
this message
|
||||||
-c or --check
|
-c or --check
|
||||||
test if path is under version control at all
|
test if path is under version control at all
|
||||||
-l or --local
|
-r or --revision
|
||||||
local revision information including an indicator for uncommitted changes
|
return unique revision information including an indicator for
|
||||||
|
uncommitted changes
|
||||||
-U or --url
|
-U or --url
|
||||||
URL associated with the latest commit
|
URL associated with the latest commit
|
||||||
-d or --date
|
-d or --date
|
||||||
@ -188,10 +188,6 @@ main() {
|
|||||||
-h|--help)
|
-h|--help)
|
||||||
action=show_help;
|
action=show_help;
|
||||||
shift;;
|
shift;;
|
||||||
-l|--local)
|
|
||||||
check_action $1
|
|
||||||
action=local_revision
|
|
||||||
shift;;
|
|
||||||
-U|--url)
|
-U|--url)
|
||||||
check_action $1
|
check_action $1
|
||||||
action=scm_url
|
action=scm_url
|
||||||
@ -200,6 +196,10 @@ main() {
|
|||||||
check_action $1
|
check_action $1
|
||||||
action="timestamp +%Y-%m-%d" # refrain from suffixing 'Z' to indicate it's UTC
|
action="timestamp +%Y-%m-%d" # refrain from suffixing 'Z' to indicate it's UTC
|
||||||
shift;;
|
shift;;
|
||||||
|
-r|--revision)
|
||||||
|
check_action $1
|
||||||
|
action=revision
|
||||||
|
shift;;
|
||||||
-t|--timestamp)
|
-t|--timestamp)
|
||||||
check_action $1
|
check_action $1
|
||||||
action="timestamp +%Y-%m-%dT%H:%M:%SZ" # There is only one valid time format! ISO 8601
|
action="timestamp +%Y-%m-%dT%H:%M:%SZ" # There is only one valid time format! ISO 8601
|
||||||
|
Loading…
x
Reference in New Issue
Block a user