Commit babb180b authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgs: allow git repo for gear_production/source

parent c5f00662
......@@ -31,6 +31,7 @@ phelp()
echog "$Descr"
echog "$Usage"
echog "You can run 'rpmgs 1.2' for set new version 1.2 and download it"
echog "Use HEAD instead version for get latest git commit"
echo
echog "Options:"
# echog " -a get all source (not only Source|Source0)"
......@@ -303,14 +304,20 @@ update_gear_production()
PSM=$(get_root_git_dir)/.gear/gear-production
local RGD=$(get_root_git_dir)
info "Detected npm install hook, run npm install --production"
info "Detected npm install hook, run npm install --production ..."
# hack for subdir??
CURNAME=$BASENAME
# TODO: add support for git
rm -rf $PSM
cp -a $RGD/$CURNAME $PSM || fatal
if [ -n "$GETSOURCEGIT" ] ; then
# cp -a exclude .dir
mkdir -p $PSM || fatal
cp -a $RGD/* $PSM || fatal
else
cp -a $RGD/$CURNAME $PSM || fatal
fi
cd $PSM || fatal
......@@ -348,7 +355,7 @@ update_gear_sources()
#if [ -d $PSM ] ; then
# only npm supported now
info "Detected npm install hook, run npm install"
info "Detected npm install hook, run npm install ..."
# if [ -d $RGD/package ] && [ -s $RGD/package/package.json ] ; then
# info "Detected npm install hook"
......@@ -361,7 +368,13 @@ update_gear_sources()
# TODO: add support for git
rm -rf $PSM
cp -a $RGD/$CURNAME $PSM || fatal
if [ -n "$GETSOURCEGIT" ] ; then
# cp -a exclude .dir
mkdir -p $PSM || fatal
cp -a $RGD/* $PSM || fatal
else
cp -a $RGD/$CURNAME $PSM || fatal
fi
cd $PSM || fatal
# CHECKME: drop postinstall due run dev scripts during install --production
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment