-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[skipci]Merge block storage and file storage compilation scripts #2089
[skipci]Merge block storage and file storage compilation scripts #2089
Conversation
8defa66
to
a76c257
Compare
Please synthesize a commit for submission. |
a76c257
to
c67fcde
Compare
util/build.sh
Outdated
get_version | ||
|
||
if [[ "$g_stor" != "bs" && "$g_stor" != "fs" ]]; then | ||
die "--stor must be either bs or fs\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message instructs how to use build.sh, as the usage message does. Maybe I can update the script to print usage message when stor is not properly specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I can update the script to print usage message when stor is not properly specified.
good idea.
# 2) copy binary to project directory | ||
# 3) generate servicectl script into project directory. | ||
create_project_dir $project_prefix | ||
copy_file "$binary" "$project_prefix/sbin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If copying the file fails, for example the file does not exist, it is recomend to print an error and exit directly without continuing to execute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is already included in create_project_dir
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -226,6 +286,11 @@ install_etcd() { | |||
create_project_dir $project_prefix | |||
copy_file "$dst/etcd" "$project_prefix/sbin" | |||
copy_file "$dst/etcdctl" "$project_prefix/sbin" | |||
gen_servicectl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto. Each install_xx
judges whether the execution is successful, and terminates the script if it fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is already included in gen_servicectl
.
Thank for you contribute @linshiyx . I played around with the new build script and it's pretty good overall. And some small improvements can make this feature become better :) |
c67fcde
to
8399456
Compare
@@ -1,6 +1,7 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# tmpl.sh = /usr/local/metaserver.conf /tmp/metaserver.conf | |||
# $1: bs/fs $2: tag $3: os | |||
function tmpl() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add set -e
to terminate any command execution error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's an easier way. But I missed it and have done it referring to utils/build.sh 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok :)
Signed-off-by: linshiyx <linshiyx5@163.com>
8399456
to
f390bac
Compare
LGTM |
What problem does this PR solve?
Issue Number: #2026
Problem Summary:
What is changed and how it works?
What's Changed:
Compile curvebs: cd curve && make build stor=bs dep=1
Compile curvefs: cd curve && make build stor=fs dep=1
How it Works:
Combine compilation scripts of curvebs with curvefs
Side effects(Breaking backward compatibility? Performance regression?):
None
Check List