Skip to content

Commit 64b5d53

Browse files
ngotxicilion
authored andcommitted
fix: add env param
1 parent 0edf3dc commit 64b5d53

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.travis/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -ev
44

55
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
66
echo "start docker build..."
7-
DIR=`pwd`;sudo docker run -it -v ${DIR}:/home/ci fibjs/build-env:latest /bin/sh -c "cd /home/ci; sh build -j2 ${ARCH}"
7+
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"
88
else
99
sh build -j2 ${ARCH}
1010
fi

build

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ usage()
1111
echo " Specifies the architecture for code generation."
1212
echo " clean: "
1313
echo " Clean the build folder."
14+
echo " ci: "
15+
echo " Specifies the environment is CI."
1416
echo " -h, --help:"
1517
echo " Print this message and exit."
1618
echo " -j: enable make '-j' option."
@@ -55,6 +57,8 @@ do
5557
;;
5658
release|debug|clean) BUILD_TYPE=$i
5759
;;
60+
ci) CI="ci"
61+
;;
5862
-j*) ENABLE_JOBS=1; BUILD_JOBS="${i#-j}"
5963
;;
6064
-v) BUILD_VERBOSE='VERBOSE=1'
@@ -184,7 +188,7 @@ else
184188
fi
185189

186190
cd fibjs
187-
sh build $BUILD_TYPE $TARGET_ARCH
191+
sh build $BUILD_TYPE $TARGET_ARCH $CI
188192
if [ $? != 0 ]; then
189193
exit 1
190194
fi

fibjs/build

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ usage()
1111
echo " Specifies the architecture for code generation."
1212
echo " clean: "
1313
echo " Clean the build folder."
14+
echo " ci: "
15+
echo " Specifies the environment is CI."
1416
echo " -h, --help:"
1517
echo " Print this message and exit."
1618
echo ""
@@ -52,6 +54,8 @@ do
5254
;;
5355
release|debug|clean) BUILD_TYPE=$i
5456
;;
57+
ci) CI="ci"
58+
;;
5559
--help|-h) usage
5660
;;
5761
*) echo "illegal option $i"
@@ -181,7 +185,7 @@ if [ "${BUILD_TYPE}" = "release" ]; then
181185
echo '[100%] Built target install.sh'
182186
chmod 777 installer.sh
183187
mv js fibjs
184-
if [ "${CI}" = "true" ]; then
188+
if [ "${CI}" = "ci" ]; then
185189
xz -cz -T2 fibjs > fibjs.xz
186190
echo '[100%] Built target fibjs.xz'
187191
fi

0 commit comments

Comments
 (0)