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
0272c87d
You need to sign in or sign up before continuing.
Commit
0272c87d
authored
Mar 26, 2019
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: some rewrite
parent
31b784c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
rpmgs
bin/rpmgs
+14
-13
No files found.
bin/rpmgs
View file @
0272c87d
...
@@ -253,10 +253,10 @@ commit_tarball()
...
@@ -253,10 +253,10 @@ commit_tarball()
local
CURNAME
local
CURNAME
CURNAME
=
$(
get_tardir_from_rules
"
$EXTTARBALL
"
$(
basename
"
$TARBALL
"
))
CURNAME
=
$(
get_tardir_from_rules
"
$EXTTARBALL
"
$(
basename
"
$TARBALL
"
))
if
[
-z
"
$CURNAME
"
]
;
then
if
[
-z
"
$CURNAME
"
]
;
then
info
"Can't get dir, just commit
$(
basename
"
$TARBALL
"
)
file"
info
"Can't get dir
(no
$EXTTARBALL
: line in rules file)
, just commit
$(
basename
"
$TARBALL
"
)
file"
EXTTARBALL
=
"copy"
EXTTARBALL
=
"copy"
CURNAME
=
$(
get_tardir_from_rules
"
$EXTTARBALL
"
$(
basename
"
$TARBALL
"
))
CURNAME
=
$(
get_tardir_from_rules
"
$EXTTARBALL
"
$(
basename
"
$TARBALL
"
))
[
-n
"
$CURNAME
"
]
||
fatal
"There is no correct '
$EXTTARBALL
:' line nor
copy:
in gear rules file for
$(
basename
"
$TARBALL
"
)
, needed for commit tarball"
[
-n
"
$CURNAME
"
]
||
fatal
"There is no correct '
$EXTTARBALL
:' line nor
'copy:'
in gear rules file for
$(
basename
"
$TARBALL
"
)
, needed for commit tarball"
fi
fi
# FIXME:
# FIXME:
# use real path for download
# use real path for download
...
@@ -296,7 +296,7 @@ update_post_git_submodules()
...
@@ -296,7 +296,7 @@ update_post_git_submodules()
#find $PSM -name ".gitmodules" -type f -delete -print
#find $PSM -name ".gitmodules" -type f -delete -print
local
i
local
i
for
i
in
$(
grep
"path = "
.gitmodules |
sed
-e
"s|.*path =
\(
.*
\)
|
\1
|"
)
;
do
#"
for
i
in
$(
grep
"path = "
.gitmodules |
sed
-e
"s|.*path =
\(
.*
\)
|
\1
|"
)
;
do
#"
cp
-a
--parents
$i
$PSM
/
||
fatal
cp
-a
l
--parents
$i
$PSM
/
||
fatal
done
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
...
@@ -330,32 +330,33 @@ update_predownloaded()
...
@@ -330,32 +330,33 @@ update_predownloaded()
cd
$PSM
||
fatal
cd
$PSM
||
fatal
if
[
-s
$RGD
/.gear/predownloaded-preinstall-hook
]
;
then
if
[
-s
$RGD
/.gear/predownloaded-preinstall-hook
]
;
then
info
"Detected .gear/predownloaded-preinstall-hook, run it ..."
sh
$RGD
/.gear/predownloaded-preinstall-hook
$MODE
sh
$RGD
/.gear/predownloaded-preinstall-hook
$MODE
COMMITMSG
=
"update predownloaded-
$MODE
with a hook script"
COMMITMSG
=
"update predownloaded-
$MODE
with a hook script"
fi
fi
#### npm only part
#### npm only part
if
[
-s
"./package.json"
]
;
then
if
[
-s
"./package.json"
]
;
then
info
"Detected npm install hook, run npm install ..."
# CHECKME: drop postinstall due run dev scripts during install --production
# CHECKME: drop postinstall due run dev scripts during install --production
# replace with fake commands?
# replace with fake commands?
local
COMMITMSG
=
''
local
COMMITMSG
=
''
#subst "s|.*postinstall.*||g" package.json
local
PRODUCTION
=
''
if
[
"
$MODE
"
=
"production"
]
;
then
a
=
npm
install
--production
||
fatal
[
"
$MODE
"
=
"production"
]
&&
PRODUCTION
=
'--production'
COMMITMSG
=
"update node_modules with npm install --production for
$VERSION
(see
$SDNAME
in .gear/rules)"
else
info
"Detected npm install hook, run npm install
$PRODUCTION
..."
a
=
npm
install
||
fatal
a
=
npm
install
$PRODUCTION
||
fatal
COMMITMSG
=
"update node_modules with npm install for
$VERSION
(see
$SDNAME
in .gear/rules)"
COMMITMSG
=
"update node_modules with npm install
$PRODUCTION
for
$VERSION
(see
$SDNAME
in .gear/rules)"
fi
if
[
-s
$RGD
/.gear/predownloaded-postinstall-hook
]
;
then
if
[
-s
$RGD
/.gear/predownloaded-postinstall-hook
]
;
then
info
"Detected .gear/predownloaded-postinstall-hook, run it ..."
sh
$RGD
/.gear/predownloaded-postinstall-hook
$MODE
sh
$RGD
/.gear/predownloaded-postinstall-hook
$MODE
fi
fi
a
=
npm prune
# prune removes modules not listed in package.json
# a= npm prune $PRODUCTION
a
=
npm dedup
a
=
npm dedup
# drop all exclude node_modules
# drop all exclude node_modules
...
...
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