Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
anbox
提交
dc21069a
A
anbox
项目概览
openeuler
/
anbox
通知
24
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
anbox
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dc21069a
编写于
6月 03, 2017
作者:
S
Simon Fels
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rework versioning to include git rev in snap version
上级
4a5ce925
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
14 deletion
+15
-14
CMakeLists.txt
CMakeLists.txt
+5
-6
snapcraft.yaml
snapcraft.yaml
+6
-4
src/anbox/build/version.cpp
src/anbox/build/version.cpp
+2
-2
src/anbox/build/version.h.in
src/anbox/build/version.h.in
+2
-2
未找到文件。
CMakeLists.txt
浏览文件 @
dc21069a
...
...
@@ -97,12 +97,11 @@ set(ANBOX_TRANSLATOR_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/anbox/translators)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DTRANSLATOR_INSTALL_DIR=
\\\"
${
CMAKE_INSTALL_PREFIX
}
/
${
ANBOX_TRANSLATOR_INSTALL_DIR
}
\\\"
"
)
if
(
NOT ANBOX_VERSION
)
set
(
ANBOX_VERSION 2
)
if
(
"
${
cmake_build_type_lower
}
"
STREQUAL
"release"
)
set
(
ANBOX_VERSION_SUFFIX
""
)
else
()
set
(
ANBOX_VERSION_SUFFIX dev
)
endif
()
exec_program
(
"git"
${
CMAKE_SOURCE_DIR
}
ARGS
"rev-parse --short HEAD"
OUTPUT_VARIABLE GIT_COMMIT_HASH
)
set
(
ANBOX_VERSION
"local-
${
GIT_COMMIT_HASH
}
"
)
endif
()
if
(
ANBOX_VERSION_SUFFIX
)
set
(
ANBOX_VERSION
"
${
ANBOX_VERSION
}
-
${
ANBOX_VERSION_SUFFIX
}
"
)
endif
()
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/anbox/build/version.h.in
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/anbox/build/version.h
)
...
...
snapcraft.yaml
浏览文件 @
dc21069a
name
:
anbox
# NOTE: Always only use increasing numeric values here. This is
# passed down into cmake and assigned to an integer variable which
# can be used for version number comparision inside the code base
# to accomondate for any breaking changes.
version
:
3
version-script
:
|
if [ "$SNAPCRAFT_GRADE" = "stable" ]; then
echo $SNAPCRAFT_PROJECT_VERSION
else
echo $SNAPCRAFT_PROJECT_VERSION-$(git rev-parse --short HEAD)
fi
summary
:
Android in a Box
description
:
|
Runtime for Android applications which runs a full Android system
...
...
src/anbox/build/version.cpp
浏览文件 @
dc21069a
...
...
@@ -25,9 +25,9 @@ namespace build {
static
std
::
string
init_version_string
()
{
std
::
string
v
;
if
(
!
version_suffix
||
std
::
strlen
(
version_suffix
)
==
0
)
v
=
utils
::
string_format
(
"%
d"
,
version_major
);
v
=
utils
::
string_format
(
"%
s"
,
version
);
else
v
=
utils
::
string_format
(
"%
d-%s"
,
version_major
,
version_suffix
);
v
=
utils
::
string_format
(
"%
s-%s"
,
version
,
version_suffix
);
return
v
;
}
...
...
src/anbox/build/version.h.in
浏览文件 @
dc21069a
...
...
@@ -25,8 +25,8 @@
namespace anbox {
namespace build {
/// @brief version
_major marks the major
version
static constexpr const
std::uint32_t version_major{@ANBOX_VERSION@
};
/// @brief version
marks the
version
static constexpr const
char *version{"@ANBOX_VERSION@"
};
/// @brief version_suffix is an additional suffix which can be amended to
/// the major version number to indicate a dev build for example.
static constexpr const char *version_suffix{"@ANBOX_VERSION_SUFFIX@"};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录