Skip to content

Commit

Permalink
fix: add env param
Browse files Browse the repository at this point in the history
  • Loading branch information
ngot authored and xicilion committed May 19, 2017
1 parent 0edf3dc commit 64b5d53
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ev

if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
echo "start docker build..."
DIR=`pwd`;sudo docker run -it -v ${DIR}:/home/ci fibjs/build-env:latest /bin/sh -c "cd /home/ci; sh build -j2 ${ARCH}"
DIR=`pwd`;sudo docker run -it -v ${DIR}:/home/ci fibjs/build-env:latest /bin/sh -c "cd /home/ci; sh build -j2 ${ARCH} ci"
else
sh build -j2 ${ARCH}
fi
Expand Down
6 changes: 5 additions & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ usage()
echo " Specifies the architecture for code generation."
echo " clean: "
echo " Clean the build folder."
echo " ci: "
echo " Specifies the environment is CI."
echo " -h, --help:"
echo " Print this message and exit."
echo " -j: enable make '-j' option."
Expand Down Expand Up @@ -55,6 +57,8 @@ do
;;
release|debug|clean) BUILD_TYPE=$i
;;
ci) CI="ci"
;;
-j*) ENABLE_JOBS=1; BUILD_JOBS="${i#-j}"
;;
-v) BUILD_VERBOSE='VERBOSE=1'
Expand Down Expand Up @@ -184,7 +188,7 @@ else
fi

cd fibjs
sh build $BUILD_TYPE $TARGET_ARCH
sh build $BUILD_TYPE $TARGET_ARCH $CI
if [ $? != 0 ]; then
exit 1
fi
Expand Down
6 changes: 5 additions & 1 deletion fibjs/build
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ usage()
echo " Specifies the architecture for code generation."
echo " clean: "
echo " Clean the build folder."
echo " ci: "
echo " Specifies the environment is CI."
echo " -h, --help:"
echo " Print this message and exit."
echo ""
Expand Down Expand Up @@ -52,6 +54,8 @@ do
;;
release|debug|clean) BUILD_TYPE=$i
;;
ci) CI="ci"
;;
--help|-h) usage
;;
*) echo "illegal option $i"
Expand Down Expand Up @@ -181,7 +185,7 @@ if [ "${BUILD_TYPE}" = "release" ]; then
echo '[100%] Built target install.sh'
chmod 777 installer.sh
mv js fibjs
if [ "${CI}" = "true" ]; then
if [ "${CI}" = "ci" ]; then
xz -cz -T2 fibjs > fibjs.xz
echo '[100%] Built target fibjs.xz'
fi
Expand Down

0 comments on commit 64b5d53

Please sign in to comment.