Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
古剑诛仙
soar
提交
d622a265
S
soar
项目概览
古剑诛仙
/
soar
与 Fork 源项目一致
Fork自
Xiaomi / soar
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
soar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d622a265
编写于
11月 03, 2018
作者:
martianzhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix .gitignore use case
上级
8eafcf6c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
15 deletion
+14
-15
.gitignore
.gitignore
+2
-7
Makefile
Makefile
+10
-6
doc/example/main_test.sh
doc/example/main_test.sh
+2
-2
未找到文件。
.gitignore
浏览文件 @
d622a265
soar
soar.darwin-386
soar.darwin-amd64
soar.linux-386
soar.linux-amd64
soar.windows-386
soar.windows-amd64
bin/
release/
common/version.go
doc/blueprint/
*.iml
...
...
Makefile
浏览文件 @
d622a265
...
...
@@ -67,9 +67,11 @@ cover: test
# Builds the project
build
:
fmt tidb-parser
@
echo
"
\0
33[92mBuilding ...
\0
33[0m"
@
mkdir
-p
bin
@
bash ./genver.sh
$(GO_VERSION_MIN)
@
ret
=
0
&&
for
d
in
$$
(
go list
-f
'{{if (eq .Name "main")}}{{.ImportPath}}{{end}}'
./...
)
;
do
\
go build
$$
d
||
ret
=
$$
?
;
\
b
=
$
$(
basename
$
${d}
)
;
\
go build
-o
bin/
$
${b}
$$
d
||
ret
=
$$
?
;
\
done
;
exit
$$
ret
@
echo
"build Success!"
...
...
@@ -78,7 +80,8 @@ fast:
@
echo
"
\0
33[92mBuilding ...
\0
33[0m"
@
bash ./genver.sh
$(GO_VERSION_MIN)
@
ret
=
0
&&
for
d
in
$$
(
go list
-f
'{{if (eq .Name "main")}}{{.ImportPath}}{{end}}'
./...
)
;
do
\
go build
$$
d
||
ret
=
$$
?
;
\
b
=
$
$(
basename
$
${d}
)
;
\
go build
-o
bin/
$
${b}
$$
d
||
ret
=
$$
?
;
\
done
;
exit
$$
ret
@
echo
"build Success!"
...
...
@@ -92,9 +95,9 @@ install: build
.PHONY
:
doc
doc
:
fast
@
echo
"
\0
33[92mAuto generate doc ...
\0
33[0m"
./soar
-list-heuristic-rules
>
doc/heuristic.md
./soar
-list-rewrite-rules
>
doc/rewrite.md
./soar
-list-report-types
>
doc/report_type.md
./
bin/
soar
-list-heuristic-rules
>
doc/heuristic.md
./
bin/
soar
-list-rewrite-rules
>
doc/rewrite.md
./
bin/
soar
-list-report-types
>
doc/report_type.md
# Add or change a heuristic rule
.PHONY
:
heuristic
...
...
@@ -144,12 +147,13 @@ lint: build
.PHONY
:
release
release
:
deps build
@
echo
"
\0
33[92mCross platform building for release ...
\0
33[0m"
@
mkdir
-p
release
@
for
GOOS
in
darwin linux windows
;
do
\
for
GOARCH
in
amd64
;
do
\
for
d
in
$$
(
go list
-f
'{{if (eq .Name "main")}}{{.ImportPath}}{{end}}'
./...
)
;
do
\
b
=
$
$(
basename
$
${d}
)
;
\
echo
"Building
$
${b}
.
$
${GOOS}
-
$
${GOARCH}
..."
;
\
GOOS
=
$
${GOOS}
GOARCH
=
$
${GOARCH}
go build
-ldflags
=
"-s -w"
-v
-o
$
${b}
.
$
${GOOS}
-
$
${GOARCH}
$$
d 2>/dev/null
;
\
GOOS
=
$
${GOOS}
GOARCH
=
$
${GOARCH}
go build
-ldflags
=
"-s -w"
-v
-o
release/
$
${b}
.
$
${GOOS}
-
$
${GOARCH}
$$
d 2>/dev/null
;
\
done
;
\
done
;
\
done
...
...
doc/example/main_test.sh
浏览文件 @
d622a265
...
...
@@ -4,9 +4,9 @@
PROJECT_PATH
=
${
GOPATH
}
/src/github.com/XiaoMi/soar/
if
[
"
$1x
"
==
"-updatex"
]
;
then
cd
"
${
PROJECT_PATH
}
"
&&
./
soar
-list-test-sqls
| ./soar
-config
=
./etc/soar.yaml
>
./doc/example/main_test.md
cd
"
${
PROJECT_PATH
}
"
&&
./
bin/soar
-list-test-sqls
| ./bin/soar
-config
=
.
./etc/soar.yaml
>
./doc/example/main_test.md
else
cd
"
${
PROJECT_PATH
}
"
&&
./
soar
-list-test-sqls
| ./soar
-config
=
./etc/soar.yaml
>
./doc/example/main_test.log
cd
"
${
PROJECT_PATH
}
"
&&
./
bin/soar
-list-test-sqls
| ./bin/soar
-config
=
.
./etc/soar.yaml
>
./doc/example/main_test.log
# optimizer_XXX 库名,散粒度,以及索引先后顺序每次可能会不一致
DIFF_LINES
=
$(
cat
./doc/example/main_test.log ./doc/example/main_test.md |
grep
-v
"optimizer
\|
散粒度"
|
sort
|
uniq
-u
|
wc
-l
)
if
[
"
${
DIFF_LINES
}
"
-gt
0
]
;
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录