1 Star 0 Fork 58

jingxiaolu/docker

forked from src-openEuler/docker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gen-commit.sh 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved.
# Description: This script uses to update docker-ce component's version and release
# Author: caihaomin@huawei.com
# Create: 2018-10-25
changeID=`git log -1 | grep Change-Id | awk '{print $2}'`
if [ "${changeID}" = "" ];then
changeID=`date | sha256sum | head -c 40`
fi
echo "${changeID}" > git-commit
old_version=`head -n 10 docker.spec|grep Release|awk '{print $2}'`
let new_version=$old_version+1
sed -i -e "s/^\Release: $old_version/Release: $new_version/g" ./*.spec
echo 18.09.0.$new_version > VERSION-vendor
author=$(git config user.name)
email=$(git config user.email)
version=$(head -10 docker.spec | grep Version | awk '{print $NF}')
release=$(head -10 docker.spec | grep Release | awk '{print $2}' | awk -F% '{print $1}')
new_all=$version-$release
new_changelog=$(cat << EOF
* $(LC_ALL="C" date '+%a %b %d %Y') $author<$email> - $new_all\n- Type:\n- CVE:\n- SUG:\n- DESC:\n
EOF
)
sed -i -e "/\%changelog/a$new_changelog" *.spec
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jingxiaolu/docker.git
git@gitee.com:jingxiaolu/docker.git
jingxiaolu
docker
docker
master

搜索帮助