Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSulad
提交
abb3f8fe
I
iSulad
项目概览
openeuler
/
iSulad
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
iSulad
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
abb3f8fe
编写于
3月 27, 2020
作者:
L
LiFeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
version: fix version git info
Signed-off-by:
N
LiFeng
<
lifeng68@huawei.com
>
上级
753af976
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
4 addition
and
8 deletion
+4
-8
CMakeLists.txt
CMakeLists.txt
+1
-7
iSulad.spec
iSulad.spec
+1
-1
update-version.bash
update-version.bash
+2
-0
未找到文件。
CMakeLists.txt
浏览文件 @
abb3f8fe
...
...
@@ -9,13 +9,7 @@ include(cmake/set_build_flags.cmake)
#set(CMAKE_C_COMPILER "gcc" CACHE PATH "c compiler")
# Get the latest abbreviated commit hash of the working branch
execute_process
(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set
(
GIT_COMMIT_HASH
"8ff7dac0993cd75494a281b509c683280417ba5c"
)
message
(
"-- commit id: "
${
GIT_COMMIT_HASH
}
)
add_definitions
(
-DISULAD_GIT_COMMIT=
"
${
GIT_COMMIT_HASH
}
"
)
...
...
iSulad.spec
浏览文件 @
abb3f8fe
%global _version 2.0.0
%global _release 2020032
1.032232.gitaec8336d
%global _release 2020032
7.195112.git8ff7dac0
%global is_systemd 1
%global debug_package %{nil}
...
...
update-version.bash
浏览文件 @
abb3f8fe
...
...
@@ -17,6 +17,7 @@
# ./update-version.bash
topDir
=
$(
git rev-parse
--show-toplevel
)
specfile
=
"
${
topDir
}
/iSulad.spec"
Cmakefile
=
"
${
topDir
}
/CMakeLists.txt"
Version_CMakefile
=
"
${
topDir
}
/cmake/options.cmake"
old_version
=
$(
cat
${
specfile
}
|
grep
"%global"
|
grep
"_version"
|
awk
{
'print $3'
}
)
first_old_version
=
$(
cat
${
specfile
}
|
grep
"%global"
|
grep
"_version"
|
awk
{
'print $3'
}
|
awk
-F
"."
{
'print $1'
}
)
...
...
@@ -49,6 +50,7 @@ commit_id=${commit_id_long:0:8}
new_release
=
`
date
"+%Y%m%d"
`
.
`
date
"+%H%M%S"
`
.git
$commit_id
echo
"The relase version has been modified, it is
${
new_release
}
"
sed
-i
"s/set(ISULAD_VERSION
\"
${
old_version
}
\"
)/set(ISULAD_VERSION
\"
${
new_version
}
\"
)/g"
${
Version_CMakefile
}
sed
-i
"s/^.*set(GIT_COMMIT_HASH.*
$/
set(GIT_COMMIT_HASH
\"
${
commit_id_long
}
\"
)/g"
${
Cmakefile
}
sed
-i
"s/^
\%
global _version
${
old_version
}
$/
\%
global _version
${
new_version
}
/g"
${
specfile
}
sed
-i
"s/^
\%
global _release
${
old_release
}
$/
\%
global _release
${
new_release
}
/g"
${
specfile
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录