Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
incubator-dubbo-admin
提交
ee3f5e42
I
incubator-dubbo-admin
项目概览
爱吃血肠
/
incubator-dubbo-admin
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-dubbo-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
ee3f5e42
编写于
3月 06, 2019
作者:
H
Huxing Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add script to check the bin distribution
上级
83f867e7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
62 addition
and
0 deletion
+62
-0
dubbo-admin-distribution/src/assembly/source-release.xml
dubbo-admin-distribution/src/assembly/source-release.xml
+1
-0
dubbo-admin-distribution/src/bin-distribution-check.sh
dubbo-admin-distribution/src/bin-distribution-check.sh
+61
-0
未找到文件。
dubbo-admin-distribution/src/assembly/source-release.xml
浏览文件 @
ee3f5e42
...
...
@@ -62,6 +62,7 @@
<exclude>
dubbo-admin-distribution/src/LICENSE
</exclude>
<exclude>
dubbo-admin-distribution/src/NOTICE
</exclude>
<exclude>
dubbo-admin-distribution/src/licenses/**
</exclude>
<exclude>
dubbo-admin-distribution/src/bin-distribution-check.sh
</exclude>
</excludes>
</fileSet>
</fileSets>
...
...
dubbo-admin-distribution/src/bin-distribution-check.sh
0 → 100644
浏览文件 @
ee3f5e42
#!bin/sh
# HOW TO RUN THIS SCRIPT
# 1. unzip the bin-release file.
# 2. place this script under your unzipped bin-release directory.
# 3. if you want to check the javascript dependencies,
# copy the package.json file to the directory.
# 4. run this script.
# Step 1: check all the dependendcies list in LICENSE are acutally bundled.
echo
"Step 1: check all the dependendcies list in LICENSE are acutally bundled"
echo
"================"
files
=(
$(
grep
jar LICENSE |
awk
-F
' '
'{ print $2 }'
)
)
for
i
in
"
${
files
[@]
}
"
;
do
file
=
$(
echo
$i
|
tr
-d
'\r'
)
if
[
!
-f
"BOOT-INF/lib/
$file
"
]
;
then
echo
"jar file
$file
is listed in LICENSE but not found in BOOT-INF/lib."
fi
done
echo
"
\n
"
# Step 2: check all the jar files under BOOT-INF/lib are listed in LICENSE.
echo
"Step 2: check all the jar files under BOOT-INF/lib are listed in LICENSE."
echo
"================"
for
i
in
BOOT-INF/lib/
*
.jar
;
do
jar
=
$(
echo
$i
|
awk
-F
'/'
'{print $3}'
)
if
[
$(
grep
-c
$jar
LICENSE
)
-eq
0
]
;
then
echo
"Found
$i
but not listed in LICENSE"
fi
done
echo
"
\n
"
# Step 3: if a project is Apache Licensed and has NOTICE, it should be listed in NOTICE
echo
"Step 3: if a project is Apache Licensed and has NOTICE, it should be listed in NOTICE"
echo
"================="
licenses
=(
$(
echo
$(
grep
"Apache 2.0"
LICENSE |
awk
-F
' '
'{if ($0 ~ /^.*\*/) printf "%s,%s\\n",$3,$5}'
))
)
for
i
in
"
${
licenses
[@]
}
"
;
do
name
=
$(
echo
$i
|
awk
-F
','
'{print $1}'
)
# echo "checking $name..."
license
=
$(
echo
$i
|
awk
-F
','
'{print $2}'
|
awk
'{if (toupper($0) ~ /.*LICENSE.*/) print $0}'
)
# remove the trailing LICENSE.txt
notice
=
"
${
license
%/*
}
/NOTICE"
noticeTxt
=
"
$notice
.txt"
if
[
$(
curl
--write-out
%
{
http_code
}
--head
--output
/dev/null
-s
$notice
|
grep
-c
200
)
-ne
0
]
\
||
[
$(
curl
--write-out
%
{
http_code
}
--head
--output
/dev/null
-s
$noticeTxt
|
grep
-c
200
)
-ne
0
]
;
then
# echo "found Notice file, checking it is listed in NOTICE"
if
[
$(
grep
-c
$name
NOTICE
)
-eq
0
]
;
then
echo
"
$name
should be added to NOTICE"
fi
fi
done
# Step 4: check javascript dependencies, ensure they are listed in LICENSE.
# TODO
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录