Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSula-libutils
提交
b00e6bcd
I
iSula-libutils
项目概览
openeuler
/
iSula-libutils
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
iSula-libutils
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b00e6bcd
编写于
5月 20, 2020
作者:
O
openeuler-ci-bot
提交者:
Gitee
5月 20, 2020
浏览文件
操作
浏览文件
下载
差异文件
!2 support rpm build
Merge pull request !2 from haozi007/init
上级
74b15609
3c321b3c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
67 addition
and
4 deletion
+67
-4
isula_libutils.spec
isula_libutils.spec
+3
-4
update-version.bash
update-version.bash
+64
-0
未找到文件。
isula_libutils.spec
浏览文件 @
b00e6bcd
%global _version 1.0.0
%global _release 202005
08.122403.git49093ba7
%global _release 202005
19.220857.git3a7aa4a4
Name: isula_libutils
Version: %{_version}
Release: %{_release}
...
...
@@ -12,9 +12,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}
BuildRequires: gcc
BuildRequires: cmake
BuildRequires: yajl-devel gtest-devel
BuildRequires:
zlib-devel
yajl-devel gtest-devel
Requires: yajl
Requires: yajl
zlib
%ifarch x86_64 aarch64
Provides: lib%{name}.so()(64bit)
...
...
@@ -55,7 +55,6 @@ install -m 0644 ./conf/isula_libutils.pc %{buildroot}/%{_libdir}/pkgconfig/
install -d $RPM_BUILD_ROOT/%{_includedir}/isula_libutils
install -m 0644 ../build/json/*.h %{buildroot}/%{_includedir}/isula_libutils/
install -m 0644 ../src/json/*.h %{buildroot}/%{_includedir}/isula_libutils/
install -m 0644 ../src/json/schema/src/*.h %{buildroot}/%{_includedir}/isula_libutils/
install -m 0644 ../third_party/log.h %{buildroot}/%{_includedir}/isula_libutils/log.h
find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
...
...
update-version.bash
0 → 100755
浏览文件 @
b00e6bcd
# iSula-libutils: utils library for iSula
#
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
#
# Authors:
# Haozi007 <liuhao27@huawei.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
#!/bin/bash
#
# usage
# ./update-version.bash
topDir
=
$(
git rev-parse
--show-toplevel
)
specfile
=
"
${
topDir
}
/isula_libutils.spec"
CMakefile
=
"
${
topDir
}
/CMakeLists.txt"
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'
}
)
second_old_version
=
$(
cat
${
specfile
}
|
grep
"%global"
|
grep
"_version"
|
awk
{
'print $3'
}
|
awk
-F
"."
{
'print $2'
}
)
third_old_version
=
$(
cat
${
specfile
}
|
grep
"%global"
|
grep
"_version"
|
awk
{
'print $3'
}
|
awk
-F
"."
{
'print $3'
}
)
read
-p
"Which level version do you want to upgrade?[1/2/3/d/N](default:N) select:"
choice
if
[[
!
-n
"
${
choice
}
"
||
${
choice
}
==
"N"
]]
;
then
echo
"The version number has not been modified, it is still
${
old_version
}
"
exit
0
fi
if
[[
${
choice
}
-eq
"1"
]]
;
then
first_old_version
=
$((
$first_old_version
+
1
))
second_old_version
=
"0"
third_old_version
=
"0"
elif
[[
${
choice
}
-eq
"2"
]]
;
then
second_old_version
=
$((
$second_old_version
+
1
))
third_old_version
=
"0"
elif
[[
${
choice
}
-eq
"3"
]]
;
then
third_old_version
=
$((
$third_old_version
+
1
))
fi
new_version
=
${
first_old_version
}
.
${
second_old_version
}
.
${
third_old_version
}
echo
"The version number has been modified:
${
old_version
}
=>
${
new_version
}
"
old_release
=
$(
cat
${
specfile
}
|
grep
"%global"
|
grep
"_release"
|
awk
{
'print $3'
}
)
commit_id_long
=
`
git log
--pretty
=
oneline
-1
|
awk
{
'print $1'
}
`
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(CLIBCNI_VERSION
\"
${
old_version
}
\"
)/set(CLIBCNI_VERSION
\"
${
new_version
}
\"
)/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
}
echo
"The release number has been modified:
${
old_release
}
=>
${
new_release
}
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录