containerd/gen-commit.sh
xiadanni 349a80d77f sync patches
1. check task list to avoid unnecessary cleanup.
2. fix dead loop
3. cleanup dangling shim by brand new context
4. fix potential panic for task in unknown state

Signed-off-by: xiadanni <xiadanni1@huawei.com>
2021-03-18 10:20:49 +08:00

13 lines
388 B
Bash
Executable File

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