kopia lustrzana https://github.com/c9/core
only run npm in docker if user is ubuntu
rodzic
00ba2fe346
commit
174b81e7ec
|
@ -3,19 +3,24 @@
|
||||||
_b9_npm() {
|
_b9_npm() {
|
||||||
local WORKDIR=$1
|
local WORKDIR=$1
|
||||||
shift
|
shift
|
||||||
docker run \
|
|
||||||
--rm \
|
# TODO run all build steps in a container
|
||||||
-w /home/ubuntu/newclient \
|
if [ $(id -u) == "1000" ]; then
|
||||||
-v $WORKDIR:/home/ubuntu/newclient \
|
docker run \
|
||||||
--sig-proxy -a STDIN -a STDOUT -a STDERR \
|
--rm \
|
||||||
$(_b9_get_newclient_image) bash -c "
|
-w /home/ubuntu/newclient \
|
||||||
echo \"$(_b9_npm_get_github_ssh)\" >> /home/ubuntu/.ssh/id_rsa_deploy
|
-v $WORKDIR:/home/ubuntu/newclient \
|
||||||
chmod 600 /home/ubuntu/.ssh/id_rsa_deploy
|
--sig-proxy -a STDIN -a STDOUT -a STDERR \
|
||||||
npm "$@"
|
$(_b9_get_newclient_image) bash -c "
|
||||||
"
|
echo \"$(_b9_npm_get_github_ssh)\" >> /home/ubuntu/.ssh/id_rsa_deploy
|
||||||
# pushd $WORKDIR
|
chmod 600 /home/ubuntu/.ssh/id_rsa_deploy
|
||||||
# npm "$@"
|
npm "$@"
|
||||||
# popd
|
"
|
||||||
|
else
|
||||||
|
pushd $WORKDIR &> /dev/null
|
||||||
|
npm "$@"
|
||||||
|
popd &> /dev/null
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_b9_npm_get_github_ssh() {
|
_b9_npm_get_github_ssh() {
|
||||||
|
|
Ładowanie…
Reference in New Issue