Merge pull request #888 from robertbaldyga/version2sha
tools: Introduce version2sha helper tool
This commit is contained in:
commit
51e0c57e74
13
tools/version2sha
Executable file
13
tools/version2sha
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright(c) 2021 Intel Corporation
|
||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
#
|
||||
|
||||
VERSION=$1
|
||||
MERGE=$(echo "$VERSION" | cut -d. -f 4)
|
||||
SHA=$(git log --merges --oneline | tac | sed "${MERGE}q;d" | cut -d " " -f 1)
|
||||
|
||||
[[ -z "$SHA" ]] && exit 1
|
||||
|
||||
echo "$SHA"
|
Loading…
Reference in New Issue
Block a user