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
0599ff37
Commit
0599ff37
authored
Nov 25, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add get_repo_name() and use it
parent
f91e6d02
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
7 deletions
+46
-7
gacl
bin/gacl
+2
-2
rpmbs
bin/rpmbs
+6
-4
common
share/eterbuild/functions/common
+4
-1
git
share/eterbuild/functions/git
+25
-0
get_git_root.sh
tests/get_git_root.sh
+9
-0
No files found.
bin/gacl
View file @
0599ff37
...
...
@@ -44,13 +44,13 @@ mygetopts()
# one param
if
[
-z
"
$2
"
]
;
then
[
"
$1
"
=
"show"
]
||
fatal
"See
$0
--help for correct options"
PROJECTNAME
=
$(
get_
gear
_name
)
PROJECTNAME
=
$(
get_
repo
_name
)
COMMAND
=
$1
# two param: add newuser or package show
elif
[
-z
"
$3
"
]
;
then
if
[
"
$1
"
=
"add"
]
;
then
# add newuser
PROJECTNAME
=
$(
get_
gear
_name
)
PROJECTNAME
=
$(
get_
repo
_name
)
COMMAND
=
$1
PARAM
=
$2
else
...
...
bin/rpmbs
View file @
0599ff37
...
...
@@ -225,12 +225,14 @@ set_binaryrepo $MENV
# If we build from gear repo, run task
if
[
-n
"
$UPLOADNOW
"
]
&&
is_gear
$SPECDIR
;
then
[
-n
"
$VERBOSE
"
]
&&
echo
"Run with gear repo..."
echo
"Prepare to publish to
$GIRARHOST
..."
# check release
build_rpms_name
"
$LISTNAMES
"
# FIXME: hack: get project name from package name
PROJECTNAME
=
$(
echo
$BASENAME
| filter_gear_name
)
#PROJECTNAME=$(get_gear_name)
pkg_release_check
pkg_release_check
$RELEASE
PROJECTNAME
=
$(
get_repo_name
)
check_gear_and_tag
||
fatal
"Can't make tag"
TAG
=
$(
get_last_tag
)
...
...
share/eterbuild/functions/common
View file @
0599ff37
...
...
@@ -258,9 +258,12 @@ filter_gear_name()
# FIXME: use in rpmbs, fix for package name from spec
get_gear_name
()
{
local
gn
local
gitdir
=
$(
get_root_git_dir
)
[
-n
"
$gitdir
"
]
||
return
basename
"
$gitdir
"
| filter_gear_name
gn
=
$(
basename
"
$gitdir
"
| filter_gear_name
)
echo
"
$gn
"
[
-n
"
$gn
"
]
}
...
...
share/eterbuild/functions/git
View file @
0599ff37
...
...
@@ -31,6 +31,31 @@ get_current_branch()
git branch |
grep
'^\*'
|
sed
's/^..//'
|
tr
-d
"
\n
"
}
# get name from current remote repository name
get_remote_repo_name
()
{
local
branch remote url
basename
branch
=
$(
get_current_branch
)
[
-n
"
$branch
"
]
||
return
remote
=
$(
git config
--get
branch.
$branch
.remote
)
url
=
$(
git config
--get
remote.
$remote
.url
)
[
-n
"
$url
"
]
||
return
basename
=
$(
basename
"
$url
"
.git
)
echo
"
$basename
"
[
-n
"
$basename
"
]
}
get_repo_name
()
{
# try use remote repo name firstly
get_remote_repo_name
&&
return
# use repo dir name in other way
get_gear_name
&&
return
# get name from spec
#build_rpms_name "$LISTNAMES"
#PROJECTNAME=$(echo $BASENAME | filter_gear_name)
}
get_remote_git_list
()
{
local
i
...
...
tests/get_git_root.sh
View file @
0599ff37
...
...
@@ -11,3 +11,12 @@ is_gear && echo "IS GEAR" || echo "IS NOT GEAR"
echo
"test gear for root_git_dir"
is_gear
$(
get_root_git_dir
)
&&
echo
"IS GEAR"
||
echo
"IS NOT GEAR"
echo
echo
-n
"get_repo_name: "
get_repo_name
echo
-n
"get_gear_name: "
get_gear_name
echo
-n
"get_remote_repo_name: "
get_remote_repo_name
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