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
3e9f52b3
Commit
3e9f52b3
authored
Feb 10, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: improve update git repo from upstream
parent
412d08f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
rpmgs
bin/rpmgs
+22
-11
No files found.
bin/rpmgs
View file @
3e9f52b3
...
...
@@ -443,9 +443,13 @@ fi
test
-z
"
$LISTNAMES
"
&&
print_error
if
[
-z
"
$GSSETVERSION
"
]
&&
$EPMCMD
assure gear-rules-verify perl-Gear-Rules
;
then
# need for gear-rules-verify
# TODO: why we have changed dir to a spec placement before?
cd
$(
get_root_git_dir
)
docmd gear-rules-verify
gear-rules-verify 2>&1 |
grep
-q
"gear-rules-verify should be run in clean repository"
&&
warning
"gear-rules-verify should be run in clean repository"
if
gear-rules-verify |
grep
-q
"Ready for tarball update"
;
then
if
gear-rules-verify 2>&1 |
grep
-q
"gear-rules-verify should be run in clean repository"
;
then
warning
"gear-rules-verify should be run in clean repository, skipping"
elif
gear-rules-verify |
grep
-q
"Ready for tarball update"
;
then
#[ -n "$GSSETVERSION" ] && warning "we will ignore version and update to the latest version from watch file"
# TODO: rpm-uscan 0.20.2.17.11 or above
$EPMCMD
assure rpm-uscan
...
...
@@ -469,6 +473,7 @@ if [ -z "$GSSETVERSION" ] && $EPMCMD assure gear-rules-verify perl-Gear-Rules ;
else
warning
"skipping"
fi
cd
-
>
/dev/null
fi
[
-z
"
$GSSETRELEASE
"
]
||
GSSKIPADDCHANGELOG
=
1
...
...
@@ -555,11 +560,16 @@ do
if
!
rhas
"
$GETSOURCE
"
"ps?://"
;
then
if
[
"
$SN
"
!=
"Source"
]
&&
[
"
$SN
"
!=
"Source0"
]
;
then
info
"No URL. Skipping
$GETSOURCE
downloading"
continue
else
# only for main source
warning
"
$SN
$GETSOURCE
has no URL. Skipping... "
if
[
-s
$(
get_root_git_dir
)
/.gear/upstream/remotes
]
;
then
warning
"
$SN
$GETSOURCE
has no URL. We will try use existed .gear/upstream/remotes"
else
warning
"
$SN
$GETSOURCE
has no URL. Skipping... "
continue
fi
fi
continue
else
download_any_tarball
"
$GETSOURCE
"
"
$FTB
"
DOWNLOADSOME
=
1
...
...
@@ -584,21 +594,22 @@ do
echo
"Run svn rebase from
$GETSOURCESVN
"
docmd git svn rebase
DOWNLOADSOME
=
1
elif
[
-n
"
${
GETSOURCEGIT
}
"
]
;
then
elif
[
-n
"
${
GETSOURCEGIT
}
"
]
||
[
-s
$(
get_root_git_dir
)
/.gear/upstream/remotes
]
;
then
if
[
-s
$(
get_root_git_dir
)
/.gear/upstream/remotes
]
;
then
docmd gear-remotes-restore
else
echog
"Try to fetch
${
GETSOURCEGIT
}
for
$spec
"
#TODO error if incompatible
docmd git remote add upstream
$GETSOURCEGIT
fi
echog
"Try to fetch
${
GETSOURCEGIT
}
for
$spec
"
#TODO check upstream
#TODO error if incompatible
docmd git remote add upstream
$GETSOURCEGIT
docmd git fetch
--tags
upstream
||
fatal
#TODO check tag: v%version or %version
docmd git fetch
--tags
upstream
if
[
-z
"
$GSSETVERSION
"
]
;
then
warning
"Empty new version variable"
elif
[
"
$GSSETVERSION
"
=
"HEAD"
]
;
then
docmd git merge upstream/master
else
# check for GSSETVERSION tag
# some heuristics
rc
=
1
alternate_tag1
=
"
$(
echo
"v
$GSSETVERSION
"
|
sed
-e
"s|
\.
|-|g"
)
"
...
...
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