summaryrefslogtreecommitdiffstats
path: root/utils/common/gitscraper.py
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2022-02-19 18:31:25 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2022-02-28 20:37:23 +0100
commitfa1e6cc5bfcf07140808891cf8e49f6dcdcb4b63 (patch)
tree446e66b7e649ea60db08f79ec6325454b4776c52 /utils/common/gitscraper.py
parent045f52d475f57053329b90e97dba7deb1676b5ec (diff)
downloadrockbox-fa1e6cc5bfcf07140808891cf8e49f6dcdcb4b63.tar.gz
rockbox-fa1e6cc5bfcf07140808891cf8e49f6dcdcb4b63.zip
rbutil: Replace deploy with tarball script.
The old deployment script doesn't work anymore due to the change to cmake, and since we build the distribution packages (zip / dmg / AppImage) with cmake directly there's not much need left for the old deployment. Change-Id: Ide20887c5bc2e22aabbfb47374d70529609fbc3c
Diffstat (limited to 'utils/common/gitscraper.py')
-rwxr-xr-xutils/common/gitscraper.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/common/gitscraper.py b/utils/common/gitscraper.py
index 5b3b316115..8d162155d9 100755
--- a/utils/common/gitscraper.py
+++ b/utils/common/gitscraper.py
@@ -142,6 +142,23 @@ def get_object(repo, blob, destfile):
return True
+def parse_rev(repo, hash):
+ '''Retrieve output of git rev-parse for a given hash.
+ @param repo Path to repository root.
+ @param hash Hash identifying the tree / commit to describe.
+ @return Description string.
+ '''
+ output = subprocess.Popen(
+ ["git", "rev-parse", "--verify", "--short=10", hash],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=repo)
+ cmdout = output.communicate()
+ if len(cmdout[1]) > 0:
+ print("An error occured!\n")
+ print(cmdout[1])
+ return ""
+ return cmdout[0].decode().rstrip()
+
+
def describe_treehash(repo, treehash):
'''Retrieve output of git-describe for a given hash.
@param repo Path to repository root.