isula-build/gen-commit.sh
xiadanni 7c7b5d03f2 isula-build: package init
Signed-off-by: xiadanni <xiadanni1@huawei.com>
2020-07-30 10:11:08 +08:00

13 lines
395 B
Bash

#!/bin/sh
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
# Description: This shell script is used to generate commitID store file.
# Author: xiadanni1@huawei.com
# Create: 2020-07-20
changeID=`git log -1 | grep Change-Id | awk '{print $2}' | head -c 40`
if [ "${changeID}" = "" ]; then
changeID=`date | sha256sum | head -c 40`
fi
echo "${changeID}" > git-commit