You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/11/21 00:30:14 UTC

[isis] 04/09: ISIS-2181 : adds build-smoketests.sh

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2181
in repository https://gitbox.apache.org/repos/asf/isis.git

View the commit online:
https://github.com/apache/isis/commit/9974e4206b39d8db7d6e9e54b765dbce6d76181c

commit 9974e4206b39d8db7d6e9e54b765dbce6d76181c
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Nov 20 21:51:17 2019 +0000

    ISIS-2181 : adds build-smoketests.sh
    
    and use "$@" instead of $*
---
 build-core.sh                  |  2 +-
 build-demo-app.sh              |  2 +-
 build-site.sh                  |  2 +-
 build-smoketests.sh            |  2 ++
 build-starter-apps.sh          |  2 +-
 scripts/ci/build-smoketests.sh | 50 ++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 56 insertions(+), 4 deletions(-)

diff --git a/build-core.sh b/build-core.sh
index 99f9224..6eab8fe 100644
--- a/build-core.sh
+++ b/build-core.sh
@@ -1,2 +1,2 @@
 #!/bin/bash
-sh scripts/ci/build-core.sh $*
\ No newline at end of file
+sh scripts/ci/build-core.sh "$@"
\ No newline at end of file
diff --git a/build-demo-app.sh b/build-demo-app.sh
index 6dccf63..26a68dd 100644
--- a/build-demo-app.sh
+++ b/build-demo-app.sh
@@ -1,2 +1,2 @@
 #!/bin/bash
-sh scripts/ci/build-demo-app.sh $*
\ No newline at end of file
+sh scripts/ci/build-demo-app.sh "$@"
\ No newline at end of file
diff --git a/build-site.sh b/build-site.sh
index 6940543..2e54ffa 100644
--- a/build-site.sh
+++ b/build-site.sh
@@ -1,2 +1,2 @@
 #!/bin/bash
-sh scripts/ci/build-site.sh $*
\ No newline at end of file
+sh scripts/ci/build-site.sh "$@"
\ No newline at end of file
diff --git a/build-smoketests.sh b/build-smoketests.sh
new file mode 100644
index 0000000..58acf0d
--- /dev/null
+++ b/build-smoketests.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+sh scripts/ci/build-smoketests.sh "$@"
\ No newline at end of file
diff --git a/build-starter-apps.sh b/build-starter-apps.sh
index 71a9178..0874e02 100644
--- a/build-starter-apps.sh
+++ b/build-starter-apps.sh
@@ -1,2 +1,2 @@
 #!/bin/bash
-sh scripts/ci/build-starter-apps.sh $*
\ No newline at end of file
+sh scripts/ci/build-starter-apps.sh "$@"
\ No newline at end of file
diff --git a/scripts/ci/build-smoketests.sh b/scripts/ci/build-smoketests.sh
new file mode 100644
index 0000000..097e7c6
--- /dev/null
+++ b/scripts/ci/build-smoketests.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+set -e
+
+SCRIPT_DIR=$( dirname "$0" )
+if [ -z "$PROJECT_ROOT_PATH" ]; then
+  PROJECT_ROOT_PATH=`cd $SCRIPT_DIR/../.. ; pwd`
+fi
+
+if [ -z "$REVISION" ]; then
+  if [ ! -z "$SHARED_VARS_FILE" ] && [ -f "$SHARED_VARS_FILE" ]; then
+    . $SHARED_VARS_FILE
+    export $(cut -d= -f1 $SHARED_VARS_FILE)
+  fi
+fi
+if [ -z "$MVN_STAGES" ]; then
+  MVN_STAGES="clean install"
+fi
+
+sh $SCRIPT_DIR/print-environment.sh "build-smoketests"
+
+#
+# update version (but just for the modules we need to build)
+#
+if [ ! -z "$REVISION" ]; then
+  cd $PROJECT_ROOT_PATH/core-parent
+  mvn versions:set -DnewVersion=$REVISION -Ddemo-smoketests
+  cd $PROJECT_ROOT_PATH
+fi
+
+#
+# now build the apps
+#
+for app in smoketests
+do
+  cd $PROJECT_ROOT_PATH/examples/$app
+
+  mvn --batch-mode \
+      clean install
+
+  cd $PROJECT_ROOT_PATH
+done
+
+#
+# finally, revert the version
+#
+if [ ! -z "$REVISION" ]; then
+  cd $PROJECT_ROOT_PATH/core-parent
+  mvn versions:revert -Dstarter-smoketests
+  cd $PROJECT_ROOT_PATH
+fi