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
35572bad
Commit
35572bad
authored
Nov 08, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: handle sections in more clear way
parent
b05bb8cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
30 deletions
+44
-30
rpmgs
bin/rpmgs
+44
-30
No files found.
bin/rpmgs
View file @
35572bad
...
...
@@ -258,7 +258,7 @@ commit_tarball_to_dir()
docmd git commit
-m
"just import
$(
basename
$TARBALL
)
with rpmgs script"
rm
-fv
"
$TARBALL
"
else
echo
"Skip missed
$TARBALL
tarball committing"
warning
"Skip missed
$TARBALL
tarball committing"
return
1
fi
return
0
...
...
@@ -489,6 +489,17 @@ update_predownloaded()
}
will_commit
()
{
if
[
-z
"
$GSSETVERSION
"
]
&&
[
-z
"
$FORCEDOWNLOAD
"
]
;
then
echog
"Skip
$FTB
committing (run without new version or without -f)"
return
1
fi
return
0
}
parse_cmd_pre_spec
"
$@
"
mygetopts
$LISTARGS
...
...
@@ -579,6 +590,7 @@ fi
$EPMCMD
assure gear-commit gear
$EPMCMD
assure gear-uupdate
docmd gear-remotes-restore
docmd git fetch
--tags
upstream
# hack: if separated branch
#if grep -q "^diff:" $(get_root_git_dir)/.gear/rules ; then
# update_master_branch_to "$GSSETVERSION"
...
...
@@ -651,23 +663,48 @@ fi
if
[
-n
"
${
GETSOURCESVN
}
"
]
;
then
is_gear
$SPECDIR
||
fatal
"Source-svn works only with gear repo"
will_commit
||
continue
# clone svn repo to current dir
# FIXME: need to clone in git root dir
docmd git svn clone
$GETSOURCESVN
$(
get_root_git_dir
)
echo
"Run svn rebase from
$GETSOURCESVN
"
docmd git svn rebase
DOWNLOADSOME
=
1
elif
[
-n
"
${
GETSOURCEGIT
}
"
]
;
then
is_gear
$SPECDIR
||
fatal
"Source-git works only with gear repo"
will_commit
||
continue
echog
"Try to fetch
${
GETSOURCEGIT
}
for
$spec
"
#TODO error if incompatible
docmd git remote add upstream
$GETSOURCEGIT
docmd git fetch
--tags
upstream
update_master_branch_to
"
$GSSETVERSION
"
update_post_git_submodules
source_postupdate_hook
DOWNLOADSOME
=
1
elif
[
-n
"
${
GETSOURCESCRIPT
}
"
]
;
then
is_gear
$SPECDIR
||
fatal
"Source-script works only with gear repo"
#[ -x "$GETSOURCESCRIPT" ] || fatal "Can't find executable $GETSOURCESCRIPT"
bash
-x
$(
get_root_git_dir
)
/
$GETSOURCESCRIPT
$GSSETVERSION
"
$FTB
"
||
fatal
"fatal with
$GETSOURCESCRIPT
"
will_commit
||
continue
commit_tarball
"
$FTB
"
||
fatal
source_postupdate_hook
DOWNLOADSOME
=
1
# TODO: rewrite code to use original file format and temp. download dir
elif
[
-n
"
${
GETSOURCEURL
}
"
]
;
then
if
[
-z
"
$FORCEDOWNLOAD
"
]
&&
check_tarball
"
$FTB
"
;
then
echo
"
$FTB
already exists, skipping... "
echo
g
"
$FTB
already exists, skipping... "
else
echog
"Try to load
${
GETSOURCEURL
}
for
$spec
"
download_to
"
$GETSOURCEURL
"
"
$FTB
"
||
fatal
"Can't download
$GETSOURCEURL
"
will_commit
||
continue
if
is_gear
;
then
commit_tarball
"
$FTB
"
||
fatal
source_postupdate_hook
fi
DOWNLOADSOME
=
1
fi
else
...
...
@@ -681,6 +718,11 @@ fi
#fi
else
download_any_tarball
"
$GETSOURCE
"
"
$FTB
"
will_commit
||
continue
if
is_gear
;
then
commit_tarball
"
$FTB
"
||
fatal
source_postupdate_hook
fi
DOWNLOADSOME
=
1
fi
...
...
@@ -689,34 +731,6 @@ fi
# download_to "$GETSOURCE" "$FTB"
fi
if
[
-z
"
$GSSETVERSION
"
]
&&
[
-z
"
$FORCEDOWNLOAD
"
]
;
then
echog
"Skip
$FTB
committing (run without new version or without -f)"
continue
fi
if
[
-n
"
${
GETSOURCESVN
}
"
]
;
then
# clone svn repo to current dir
# FIXME: need to clone in git root dir
docmd git svn clone
$GETSOURCESVN
$(
get_root_git_dir
)
echo
"Run svn rebase from
$GETSOURCESVN
"
docmd git svn rebase
DOWNLOADSOME
=
1
elif
[
-n
"
${
GETSOURCEGIT
}
"
]
;
then
echog
"Try to fetch
${
GETSOURCEGIT
}
for
$spec
"
#TODO error if incompatible
docmd git remote add upstream
$GETSOURCEGIT
docmd git fetch
--tags
upstream
update_master_branch_to
"
$GSSETVERSION
"
update_post_git_submodules
source_postupdate_hook
DOWNLOADSOME
=
1
elif
is_gear
;
then
commit_tarball
"
$FTB
"
source_postupdate_hook
DOWNLOADSOME
=
1
fi
# TODO: make plugins
update_predownloaded development
update_predownloaded production
...
...
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