Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
74fba317
Commit
74fba317
authored
Aug 22, 2017
by
tywldx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e1702a03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
2_get_code_by_name.sh
qa_shell_script/2_get_code_by_name.sh
+3
-2
2_get_code_by_type.sh
qa_shell_script/2_get_code_by_type.sh
+2
-2
No files found.
qa_shell_script/2_get_code_by_name.sh
View file @
74fba317
...
@@ -26,7 +26,7 @@ if [ -n "$project_folder" ];then
...
@@ -26,7 +26,7 @@ if [ -n "$project_folder" ];then
git checkout
-f
$git_branch
git checkout
-f
$git_branch
if
[
$?
=
0
]
;
then
if
[
$?
=
0
]
;
then
echo
"checkout branch
$git_branch
is ok"
.
echo
"checkout branch
$git_branch
is ok"
.
git pull
#
git pull
else
else
echo
"Fail to checkout branch
$git_branch
"
.
echo
"Fail to checkout branch
$git_branch
"
.
exit
-1
exit
-1
...
@@ -36,8 +36,9 @@ if [ -n "$project_folder" ];then
...
@@ -36,8 +36,9 @@ if [ -n "$project_folder" ];then
#git checkout -f master
#git checkout -f master
git_branch
=
`
git branch |
grep
'*'
|
awk
'{print $2}'
`
git_branch
=
`
git branch |
grep
'*'
|
awk
'{print $2}'
`
echo
"current branch:
$git_branch
"
echo
"current branch:
$git_branch
"
git pull
#
git pull
fi
fi
git reset FETCH_HEAD
--hard
git reset FETCH_HEAD
--hard
else
else
desc
=
`
node
$config_server
/get_project_config.js
-name
$project_name
-attr
desc
`
desc
=
`
node
$config_server
/get_project_config.js
-name
$project_name
-attr
desc
`
...
...
qa_shell_script/2_get_code_by_type.sh
View file @
74fba317
...
@@ -29,8 +29,8 @@ function getCode()
...
@@ -29,8 +29,8 @@ function getCode()
git checkout ./
git checkout ./
echo
"git fetch"
echo
"git fetch"
git fetch
git fetch
echo
"git pull"
#
echo "git pull"
git pull
#
git pull
#如果拉代码失败,则获取现在所处分支,然后删掉现在的项目,重新clone
#如果拉代码失败,则获取现在所处分支,然后删掉现在的项目,重新clone
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"error: Pulling is not possible because you have unmerged files"
echo
"error: Pulling is not possible because you have unmerged files"
...
...
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