You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mnemonic.apache.org by ga...@apache.org on 2017/05/12 19:08:23 UTC
incubator-mnemonic git commit: MNEMONIC-264: Add option to suppress
the confirmation for Docker build
Repository: incubator-mnemonic
Updated Branches:
refs/heads/master cdde2b21f -> 274a04001
MNEMONIC-264: Add option to suppress the confirmation for Docker build
Project: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/commit/274a0400
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/tree/274a0400
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/diff/274a0400
Branch: refs/heads/master
Commit: 274a040019a4f792a5de2c1b1ad2829eecd2134e
Parents: cdde2b2
Author: Wang, Gang(Gary) <ga...@intel.com>
Authored: Fri May 12 12:00:03 2017 -0700
Committer: Wang, Gang(Gary) <ga...@intel.com>
Committed: Fri May 12 12:07:21 2017 -0700
----------------------------------------------------------------------
build-tools/runall.sh | 20 +++++++++++++++++++-
docker/Dockerfile | 2 +-
2 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/274a0400/build-tools/runall.sh
----------------------------------------------------------------------
diff --git a/build-tools/runall.sh b/build-tools/runall.sh
index ad445e6..42362cc 100755
--- a/build-tools/runall.sh
+++ b/build-tools/runall.sh
@@ -16,6 +16,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+ARGCONFIRMED=false
+
+while getopts ":y" opt; do
+ case $opt in
+ y)
+ ARGCONFIRMED=true
+ ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ ;;
+ esac
+done
continueprompt() {
while true; do
@@ -35,7 +47,13 @@ fi
pushd "$MNEMONIC_HOME" || { echo "the environment variable \$MNEMONIC_HOME contains invalid home directory of Mnemonic project."; exit 11; }
echo [INFO] Cleaning up and re-building...
-git ls-files --error-unmatch pom.xml > /dev/null 2>&1 && continueprompt "Please make sure all source codes have already been checked in or backed up otherwise un-checked files would be purged" && git clean -xdf > /dev/null
+git ls-files --error-unmatch pom.xml > /dev/null 2>&1; rc=$?
+if [[ $rc == 0 ]]; then
+ if [[ "$ARGCONFIRMED" == "false" ]]; then
+ continueprompt "Please make sure all source codes have already been checked in or backed up otherwise un-checked files would be purged"
+ fi
+ git clean -xdf > /dev/null
+fi
if [ ! -d "testlog" ]
then
http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/274a0400/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/Dockerfile b/docker/Dockerfile
index f6f6883..bbf89fb 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -66,7 +66,7 @@ RUN cd /ws && git clone https://github.com/apache/incubator-mnemonic.git && \
ENV MNEMONIC_HOME /ws/incubator-mnemonic
-RUN cd /ws/incubator-mnemonic && build-tools/runall.sh
+RUN cd /ws/incubator-mnemonic && build-tools/runall.sh -y
WORKDIR /ws
CMD ["bash"]