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