Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
40718cb1
You need to sign in or sign up before continuing.
Commit
40718cb1
authored
Mar 16, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branch: add support gremote (update branch from gear repo)
parent
4d35f3e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
branch
share/eterbuild/functions/branch
+17
-0
No files found.
share/eterbuild/functions/branch
View file @
40718cb1
...
@@ -53,12 +53,29 @@ checkout_bpbranch()
...
@@ -53,12 +53,29 @@ checkout_bpbranch()
echo
"
$CURBRANCH
"
>
$(
get_root_git_dir
)
/.git/.rpmbph.current
echo
"
$CURBRANCH
"
>
$(
get_root_git_dir
)
/.git/.rpmbph.current
local
PGEAR
=
"gear"
# Create branch if not exist yet
# Create branch if not exist yet
if
is_exist_branch
$USEBRANCH
;
then
if
is_exist_branch
$USEBRANCH
;
then
docmd git checkout
$USEBRANCH
||
fatal
"Can't checkout branch
$USEBRANCH
. Use
$BPSPEC
manually or remove it."
docmd git checkout
$USEBRANCH
||
fatal
"Can't checkout branch
$USEBRANCH
. Use
$BPSPEC
manually or remove it."
# if we successful with gear
if
git branch
-a
|
grep
-q
"remotes/
$PGEAR
/
$USEBRANCH
"
;
then
docmd git fetch
$PGEAR
$USEBRANCH
docmd git merge
--ff-only
$PGEAR
/
$USEBRANCH
||
fatal
fi
else
info
"Creating branch
$USEBRANCH
..."
if
!
git branch
-a
|
grep
-q
"remotes/
$PGEAR
/
$USEBRANCH
"
;
then
# if we have no fetched branch
docmd gremote
$GIRARHOST
-o
fi
# if we successful with gear
if
git branch
-a
|
grep
-q
"remotes/
$PGEAR
/
$USEBRANCH
"
;
then
docmd git fetch
$PGEAR
$USEBRANCH
docmd git checkout
-b
$USEBRANCH
$PGEAR
/
$USEBRANCH
||
fatal
else
else
docmd git checkout
-b
$USEBRANCH
||
fatal
docmd git checkout
-b
$USEBRANCH
||
fatal
fi
fi
fi
}
}
# used: USEBRNACH
# used: USEBRNACH
...
...
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