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() ...@@ -31,6 +31,7 @@ phelp()
echog "$Descr" echog "$Descr"
echog "$Usage" echog "$Usage"
echog "You can run 'rpmgs 1.2' for set new version 1.2 and download it" 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 echo
echog "Options:" echog "Options:"
# echog " -a get all source (not only Source|Source0)" # echog " -a get all source (not only Source|Source0)"
...@@ -303,14 +304,20 @@ update_gear_production() ...@@ -303,14 +304,20 @@ update_gear_production()
PSM=$(get_root_git_dir)/.gear/gear-production PSM=$(get_root_git_dir)/.gear/gear-production
local RGD=$(get_root_git_dir) 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?? # hack for subdir??
CURNAME=$BASENAME CURNAME=$BASENAME
# TODO: add support for git # TODO: add support for git
rm -rf $PSM rm -rf $PSM
if [ -n "$GETSOURCEGIT" ] ; then
# cp -a exclude .dir
mkdir -p $PSM || fatal
cp -a $RGD/* $PSM || fatal
else
cp -a $RGD/$CURNAME $PSM || fatal cp -a $RGD/$CURNAME $PSM || fatal
fi
cd $PSM || fatal cd $PSM || fatal
...@@ -348,7 +355,7 @@ update_gear_sources() ...@@ -348,7 +355,7 @@ update_gear_sources()
#if [ -d $PSM ] ; then #if [ -d $PSM ] ; then
# only npm supported now # 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 # if [ -d $RGD/package ] && [ -s $RGD/package/package.json ] ; then
# info "Detected npm install hook" # info "Detected npm install hook"
...@@ -361,7 +368,13 @@ update_gear_sources() ...@@ -361,7 +368,13 @@ update_gear_sources()
# TODO: add support for git # TODO: add support for git
rm -rf $PSM rm -rf $PSM
if [ -n "$GETSOURCEGIT" ] ; then
# cp -a exclude .dir
mkdir -p $PSM || fatal
cp -a $RGD/* $PSM || fatal
else
cp -a $RGD/$CURNAME $PSM || fatal cp -a $RGD/$CURNAME $PSM || fatal
fi
cd $PSM || fatal cd $PSM || fatal
# CHECKME: drop postinstall due run dev scripts during install --production # 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