Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
6209d8da
Commit
6209d8da
authored
Jun 17, 2016
by
Matthew Brett
Browse files
Add code-cleaning utility function
parent
09555a6b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
common_utils.sh
common_utils.sh
+14
-1
No files found.
common_utils.sh
View file @
6209d8da
...
...
@@ -44,6 +44,19 @@ function rm_mkdir {
mkdir
$path
}
function
clean_code
{
local
repo_dir
=
${
1
:-
$REPO_DIR
}
local
build_commit
=
${
2
:-
$BUILD_COMMIT
}
[
-z
"
$repo_dir
"
]
&&
echo
"repo_dir not defined"
&&
exit
1
[
-z
"
$build_commit
"
]
&&
echo
"build_commit not defined"
&&
exit
1
(
cd
$repo_dir
\
&&
git fetch origin
\
&&
git checkout
$build_commit
\
&&
git clean
-fxd
\
&&
git reset
--hard
\
&&
git submodule update
--init
--recursive
)
}
function
build_wheel
{
# Builds wheel, puts into $WHEEL_SDIR
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment