Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
d3808c7b
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d3808c7b
编写于
3月 07, 2016
作者:
M
Maximilian Michels
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-3585][tools] let deploy scripts work with spaces in paths
上级
c413b23b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
20 deletion
+29
-20
tools/deploy_to_maven.sh
tools/deploy_to_maven.sh
+10
-10
tools/generate_specific_pom.sh
tools/generate_specific_pom.sh
+19
-10
未找到文件。
tools/deploy_to_maven.sh
浏览文件 @
d3808c7b
...
...
@@ -22,15 +22,15 @@
#
function
getVersion
()
{
here
=
"
`
dirname
\"
$0
\"
`
"
# relative
here
=
"
`
(
cd
\"
$here
\"
&&
pwd
)
`
"
# absolutized and normalized
if
[
-z
"
$here
"
]
;
then
# error; for some reason, the path is not accessible
# to the script (e.g. permissions re-evaled after suid)
exit
1
# fail
fi
flink_home
=
"
`
dirname
\"
$here
\"
`
"
cd
$flink_home
here
=
"
`
dirname
\"
$0
\"
`
"
# relative
here
=
"
`
(
cd
\"
$here
\"
&&
pwd
)
`
"
# absolutized and normalized
if
[
-z
"
$here
"
]
;
then
# error; for some reason, the path is not accessible
# to the script (e.g. permissions re-evaled after suid)
exit
1
# fail
fi
flink_home
=
"
`
dirname
\"
$here
\"
`
"
cd
"
$flink_home
"
echo
`
mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate
-Dexpression
=
project.version |
grep
-E
'^([0-9]+.[0-9]+(.[0-9]+)?(-[a-zA-Z0-9]+)?)$'
`
}
...
...
@@ -69,7 +69,7 @@ cd dummy-lifecycle-mapping-plugin
mvn
-B
install
cd
..
# this will take a while
CURRENT_FLINK_VERSION
=
`
getVersion
`
if
[[
"
$CURRENT_FLINK_VERSION
"
==
*
-SNAPSHOT
]]
;
then
CURRENT_FLINK_VERSION_HADOOP1
=
${
CURRENT_FLINK_VERSION
/-SNAPSHOT/-hadoop1-SNAPSHOT
}
...
...
tools/generate_specific_pom.sh
浏览文件 @
d3808c7b
...
...
@@ -78,12 +78,20 @@ if [[ -z "$new_pom_name" ]]; then
fi
echo
"Using
$nupom
as name for the generated pom file."
poms
=
`
find
$flink_home
-name
pom.xml
`
for
p
in
$poms
;
do
# export relevant variables for find command subshells
export
hadoop1
export
hadoop2
export
nupom
# paths may contain spaces
find
"
$flink_home
"
-name
pom.xml
-exec
bash
-c
'
p="$0"
# write into tmp file because in-place replacement is not possible (if nupom="pom.xml")
tmp_nuname1
=
"
`
dirname
$p
`
/__generate_specific_pom_tmp1"
tmp_nuname2
=
"
`
dirname
$p
`
/__generate_specific_pom_tmp2"
nuname
=
"
`
dirname
$p
`
/
${
nupom
}
"
tmp_nuname1="`dirname
"$p"
`/__generate_specific_pom_tmp1"
tmp_nuname2="`dirname
"$p"
`/__generate_specific_pom_tmp2"
nuname="`dirname
"$p"
`/${nupom}"
# Now we do search and replace of explicit strings. The best way of
# seeing what the below does is by doing a diff between the original
# pom and the generated pom (pom.hadoop1.xml or pom.hadoop2.xml). We
...
...
@@ -97,7 +105,7 @@ for p in $poms; do
# To avoid accidentally replace version numbers in our dependencies
# sharing the version number with the current release use the following.
perl
-0777
-pe
"s:<groupId>org.apache.flink</groupId>
\n
([
\t
]*<artifactId>([a-z]+-)+[a-z0-9
\.\_
]+</artifactId>
\n
[
\t
]*)<version>
${
old_version
}
</version>:<groupId>org.apache.flink</groupId>
\n\1
<version>
${
new_version
}
</version>:g"
$p
>
"
$tmp_nuname1
"
perl -0777 -pe "s:<groupId>org.apache.flink</groupId>\n([\t ]*<artifactId>([a-z]+-)+[a-z0-9\.\_]+</artifactId>\n[\t ]*)<version>${old_version}</version>:<groupId>org.apache.flink</groupId>\n\1<version>${new_version}</version>:g"
"$p"
> "$tmp_nuname1"
# replace the version also in the quickstart poms (so that the hadoop1 quickstart creates an hadoop1 project)
perl -0777 -pe "s:<flink.version>${old_version}</flink.version>:<flink.version>${new_version}</flink.version>:g" "$tmp_nuname1" > "$tmp_nuname2"
...
...
@@ -109,8 +117,9 @@ for p in $poms; do
-e "s/\(relativePath>\.\.\)/\1\/${nupom}/" \
-e "s/<!--hadoop1-->.*name>.*/${hadoop1}/" \
-e "s/<!--hadoop2-->.*name>.*/${hadoop2}/" \
$tmp_nuname2
>
"
$tmp_nuname1
"
rm
$tmp_nuname2
mv
$tmp_nuname1
$nuname
done
"$tmp_nuname2" > "$tmp_nuname1"
rm "$tmp_nuname2"
mv "$tmp_nuname1" "$nuname"
'
"{}"
\;
# pass file name as argument
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录