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
616658ce
Commit
616658ce
authored
Jun 02, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbs: use get_last_tag
parent
b7996505
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
rpmbs
bin/rpmbs
+15
-15
No files found.
bin/rpmbs
View file @
616658ce
...
@@ -98,13 +98,12 @@ LISTRPMARGS=$@
...
@@ -98,13 +98,12 @@ LISTRPMARGS=$@
}
}
# create tag according to package release
# c
heck and c
reate tag according to package release
# used: SPECDIR, LISTNAMES, FORCE
# used: SPECDIR, LISTNAMES, FORCE
check_gear_and_tag
()
check_gear_and_tag
()
{
{
local
RESULT
=
0
local
RESULT
=
0
local
GEARCTAG
=
gear-create-tag
local
GEARCTAG
=
gear-create-tag
local
TAG
=
"
$1
"
# set SPECDIR from LISTNAMES if empty
# set SPECDIR from LISTNAMES if empty
[
-n
"
$SPECDIR
"
]
||
set_specdir
$LISTNAMES
[
-n
"
$SPECDIR
"
]
||
set_specdir
$LISTNAMES
...
@@ -112,8 +111,8 @@ check_gear_and_tag()
...
@@ -112,8 +111,8 @@ check_gear_and_tag()
# do check only on gear repo
# do check only on gear repo
is_gear
$SPECDIR
||
return
0
is_gear
$SPECDIR
||
return
0
if
[
-z
"
$FORCE
"
]
&&
is_last_commit_tag
$TAG
;
then
if
[
-z
"
$FORCE
"
]
&&
is_last_commit_tag
;
then
echo
"Tag
$
TAG
already exists for the last commit"
echo
"Tag
$
(
get_last_tag
)
already exists for the last commit"
return
0
return
0
fi
fi
...
@@ -126,11 +125,10 @@ check_gear_and_tag()
...
@@ -126,11 +125,10 @@ check_gear_and_tag()
# if there is a problem connecting to the agent.
# if there is a problem connecting to the agent.
# GPG_AGENT_INFO=
# GPG_AGENT_INFO=
[
-n
"
$FORCE
"
]
&&
echo
"Force create
$TAG
tag..."
||
echo
"Create
$TAG
tag..."
[
-n
"
$FORCE
"
]
&&
echo
"Force create
tag..."
||
echo
"Create
tag..."
cd
$SPECDIR
>
/dev/null
cd
$SPECDIR
>
/dev/null
# default: <VERSION>-<RELEASE>
docmd
$GEARCTAG
$FORCE
||
RESULT
=
1
docmd
$GEARCTAG
$FORCE
||
RESULT
=
1
if
[
"
$RESULT
"
=
1
]
;
then
if
[
"
$RESULT
"
=
1
]
;
then
if
$GEARCTAG
$FORCE
2>&1 |
grep
-q
"Too many specfiles found"
;
then
if
$GEARCTAG
$FORCE
2>&1 |
grep
-q
"Too many specfiles found"
;
then
...
@@ -140,8 +138,10 @@ check_gear_and_tag()
...
@@ -140,8 +138,10 @@ check_gear_and_tag()
RESULT
=
1
RESULT
=
1
fi
fi
fi
fi
test
-z
"
$TAG
"
||
docmd git tag
-v
"
$TAG
"
||
fatal
"Tag
$TAG
still missed in the repo"
local
TAG
=
$(
get_last_tag
)
test
-z
"
$TAG
"
||
is_last_commit_tag
||
docmd git tag
-v
"
$TAG
"
||
fatal
"Tag
$TAG
still missed in the repo"
cd
-
>
/dev/null
cd
-
>
/dev/null
echo
"Tag
$TAG
is set"
return
$RESULT
return
$RESULT
}
}
...
@@ -199,8 +199,7 @@ LISTBUILT=""
...
@@ -199,8 +199,7 @@ LISTBUILT=""
CURDIR
=
`
pwd
`
CURDIR
=
`
pwd
`
if
[
-n
"
$SIGNTAG
"
]
;
then
if
[
-n
"
$SIGNTAG
"
]
;
then
echo
"Set tag..."
check_gear_and_tag
check_gear_and_tag
""
exit
$?
exit
$?
fi
fi
...
@@ -219,14 +218,15 @@ set_binaryrepo $MENV
...
@@ -219,14 +218,15 @@ set_binaryrepo $MENV
if
[
-n
"
$UPLOADNOW
"
]
&&
is_gear
$SPECDIR
;
then
if
[
-n
"
$UPLOADNOW
"
]
&&
is_gear
$SPECDIR
;
then
echo
"Run with gear repo..."
echo
"Run with gear repo..."
build_rpms_name
"
$LISTNAMES
"
build_rpms_name
"
$LISTNAMES
"
# hack: get project name from package name
#
FIXME:
hack: get project name from package name
PROJECTNAME
=
$(
echo
$BASENAME
| filter_gear_name
)
PROJECTNAME
=
$(
echo
$BASENAME
| filter_gear_name
)
#PROJECTNAME=$(get_gear_name)
#PROJECTNAME=$(get_gear_name)
pkg_release_check
pkg_release_check
TAG
=
$VERSION
-
$RELEASE
check_gear_and_tag
"
$TAG
"
||
fatal
"Can't make tag"
check_gear_and_tag
||
fatal
"Can't make tag"
docmd
$ETERBUILDBIN
/gpush
$GIRARHOST
$FORCE
"
$TAG
"
||
fatal
"gpush failed. Possibly you need to run '
\$
ginit
$GIRARHOST
' for create remote repo."
TAG
=
$(
get_last_tag
)
docmd
$ETERBUILDBIN
/gpush
$GIRARHOST
$FORCE
||
fatal
"gpush failed"
docmd
$ETERBUILDBIN
/gpush
$GIRARHOST
$FORCE
||
fatal
"gpush failed. Possibly you need to run '
\$
ginit
$GIRARHOST
' for create remote repo."
echo
echo
echo
"Run build
$PROJECTNAME
at
$GIRARHOST
"
echo
"Run build
$PROJECTNAME
at
$GIRARHOST
"
if
[
-n
"
$TASKNUMBER
"
]
;
then
if
[
-n
"
$TASKNUMBER
"
]
;
then
...
@@ -261,7 +261,7 @@ pkg_release_check $LISTBUILT
...
@@ -261,7 +261,7 @@ pkg_release_check $LISTBUILT
# if only one file
# if only one file
if
[
-r
"
$LISTBUILT
"
]
;
then
if
[
-r
"
$LISTBUILT
"
]
;
then
check_gear_and_tag
""
check_gear_and_tag
fi
fi
...
...
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