[Ezbench-dev] [PATCH 03/15] profile/repos: add profile_repo_version_title
Martin Peres
martin.peres at linux.intel.com
Mon Jan 30 20:54:01 UTC 2017
This allows fetching the title of a version
---
profiles.d/utils/git-repo.sh | 12 ++++++++++++
profiles.d/utils/no-repo.sh | 7 +++++++
2 files changed, 19 insertions(+)
diff --git a/profiles.d/utils/git-repo.sh b/profiles.d/utils/git-repo.sh
index 6bac5d4..031dd18 100644
--- a/profiles.d/utils/git-repo.sh
+++ b/profiles.d/utils/git-repo.sh
@@ -75,6 +75,18 @@ function profile_repo_version_to_human() {
fi
}
+# MANDATORY: Print the title of the version passed as a parameter
+# Inputs:
+# - $repoDir
+function profile_repo_version_title() {
+ GIT_DIR="$repoDir/.git" git show --format="%s" -s "$1" 2> /dev/null
+ local ret=$?
+ if [ $ret -ne 0 ]; then
+ echo "<error>"
+ return $ret
+ fi
+}
+
# MANDATORY: Print the full name of the version
# Inputs:
# - $repoDir
diff --git a/profiles.d/utils/no-repo.sh b/profiles.d/utils/no-repo.sh
index 385560e..902cbe5 100644
--- a/profiles.d/utils/no-repo.sh
+++ b/profiles.d/utils/no-repo.sh
@@ -40,6 +40,13 @@ function profile_repo_version() {
echo ""
}
+# MANDATORY: Print the title of the version passed as a parameter
+# Inputs:
+# - $repoDir
+function profile_repo_version_title() {
+ echo ""
+}
+
# MANDATORY: Print the repo type
# Inputs: None
function profile_repo_type() {
--
2.11.0
More information about the Ezbench-dev
mailing list