diff --git a/build.sh b/build.sh index 016e47399..9dee26a19 100755 --- a/build.sh +++ b/build.sh @@ -22,5 +22,16 @@ fi echo Building dotnet tools verison - $DOTNET_BUILD_VERSION -$DIR/scripts/bootstrap.sh -$DIR/scripts/package.sh +if [ ! -z "$BUILD_IN_DOCKER" ]; then + export BUILD_COMMAND="/opt/code/scripts/bootstrap.sh" + $DIR/scripts/dockerbuild.sh +else + $DIR/scripts/bootstrap.sh +fi + +if [ ! -z "$PACKAGE_IN_DOCKER" ]; then + export BUILD_COMMAND="/opt/code/scripts/package.sh" + $DIR/scripts/dockerbuild.sh +else + $DIR/scripts/package.sh +fi \ No newline at end of file diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh index c3dd44455..9a5a24d2f 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -33,14 +33,9 @@ if [[ "$(uname)" == "Linux" ]]; then [ ! -z "$BUILD_BUILDID" ] && container_name="$BUILD_BUILDID" export DOTNET_BUILD_CONTAINER_NAME="$container_name" + export PACKAGE_IN_DOCKER="true" - # Build Binaries outside of Docker - $SCRIPT_DIR/bootstrap.sh $@ - - # Change Docker Build command to packaging only - export BUILD_COMMAND="/opt/code/scripts/package.sh" - $SCRIPT_DIR/dockerbuild.sh - + $SCRIPT_DIR/../build.sh $@ else $SCRIPT_DIR/../build.sh $@ fi