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
3f63f2c4
You need to sign in or sign up before continuing.
Commit
3f63f2c4
authored
Jun 24, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: improve support for gitmodules
parent
36640504
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
rpmgs
bin/rpmgs
+10
-5
No files found.
bin/rpmgs
View file @
3f63f2c4
...
@@ -283,15 +283,20 @@ update_post_git_submodules()
...
@@ -283,15 +283,20 @@ update_post_git_submodules()
cat
$(
get_root_git_dir
)
/.gear/rules |
grep
-q
"tar:.*-postsubmodules"
||
fatal
"missed tar:.gear/
$BASENAME
-postmodules in
$(
get_root_git_dir
)
/.gear/rules"
cat
$(
get_root_git_dir
)
/.gear/rules |
grep
-q
"tar:.*-postsubmodules"
||
fatal
"missed tar:.gear/
$BASENAME
-postmodules in
$(
get_root_git_dir
)
/.gear/rules"
[
-s
$(
get_root_git_dir
)
/.gitmodules
]
||
fatal
"there is no .gitmodules file in repo root"
[
-s
$(
get_root_git_dir
)
/.gitmodules
]
||
fatal
"there is no .gitmodules file in repo root"
cd
$(
get_root_git_dir
)
||
fatal
docmd git submodule init
docmd git submodule init
docmd git submodule
sync
docmd git submodule
sync
docmd git submodule update
||
fatal
docmd git submodule update
||
fatal
rm
-rfv
$PSM
/
*
rm
-rfv
$PSM
/
*
# echo * do not catch .names really
# echo * do not catch .names really
cp
-a
$(
echo
*
|
grep
-v
-E
"(.gear|.git)"
)
$PSM
/
||
fatal
#"
#cp -a $(echo * | grep -v -E "(.gear|.git)") $PSM/ || fatal #"
find
$PSM
-name
".git"
-type
f
-delete
-print
#find $PSM -name ".git" -type f -delete -print
find
$PSM
-name
".gitsubmodules"
-type
f
-delete
-print
#find $PSM -name ".gitmodules" -type f -delete -print
local
i
for
i
in
$(
grep
"path = "
.gitmodules |
sed
-e
"s|.*path =
\(
.*
\)
|
\1
|"
)
;
do
#"
cp
-a
--parents
$i
$PSM
/
||
fatal
done
docmd git add
-f
$PSM
docmd git add
-f
$PSM
# TODO: put short commit id in a description
# TODO: put short commit id in a description
# git rev-parse --short HEAD
# git rev-parse --short HEAD
...
@@ -430,7 +435,7 @@ do
...
@@ -430,7 +435,7 @@ do
# Set version if needed
# Set version if needed
if
[
-n
"
$GSSETVERSION
"
]
&&
[
"
$GSSETVERSION
"
!=
"HEAD"
]
;
then
if
[
-n
"
$GSSETVERSION
"
]
&&
[
"
$GSSETVERSION
"
!=
"HEAD"
]
;
then
CURVER
=
$(
get_version
$spec
)
CURVER
=
$(
get_version
$spec
)
set_version
$spec
$
GSSETVERSION
set_version
$spec
$
{
GSSETVERSION
/-*/
}
if
[
"
$CURVER
"
!=
"
$GSSETVERSION
"
]
;
then
if
[
"
$CURVER
"
!=
"
$GSSETVERSION
"
]
;
then
set_release
$spec
$GSSETRELEASE
set_release
$spec
$GSSETRELEASE
if
[
-n
"
$GSSETRELEASE
"
]
;
then
if
[
-n
"
$GSSETRELEASE
"
]
;
then
...
@@ -532,7 +537,7 @@ do
...
@@ -532,7 +537,7 @@ do
if
[
"
$GSSETVERSION
"
=
"HEAD"
]
;
then
if
[
"
$GSSETVERSION
"
=
"HEAD"
]
;
then
docmd git merge upstream/master
docmd git merge upstream/master
else
else
local
alternate_tag1
#
local alternate_tag1
alternate_tag1
=
"
$(
echo
"v
$GSSETVERSION
"
|
sed
-e
"s|
\.
|-|g"
)
"
alternate_tag1
=
"
$(
echo
"v
$GSSETVERSION
"
|
sed
-e
"s|
\.
|-|g"
)
"
docmd git merge v
$GSSETVERSION
||
docmd git merge
$GSSETVERSION
||
docmd git merge
$alternate_tag1
||
fatal
docmd git merge v
$GSSETVERSION
||
docmd git merge
$GSSETVERSION
||
docmd git merge
$alternate_tag1
||
fatal
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