Skip to content

Commit

Permalink
Merge pull request #6 from hpi-swa/fniephaus-patch-1
Browse files Browse the repository at this point in the history
Introduce default `$SMALLTALK` value; fixes #5
  • Loading branch information
fniephaus committed Oct 19, 2015
2 parents 32225a1 + a3ccd2a commit 07fab2b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ env:
global:
- BASELINE=SWTDemo
matrix:
- SMALLTALK="" # Use default Smalltalk version
- SMALLTALK="SqueakTrunk"
- SMALLTALK="Squeak5.0"
- SMALLTALK="Squeak4.6"
Expand All @@ -28,4 +29,4 @@ install:
- cd filetreeCI-*
- export FILETREE_CI_HOME="$(pwd)"

script: $FILETREE_CI_HOME/run.sh
script: $FILETREE_CI_HOME/run.sh
24 changes: 11 additions & 13 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ function print_error {

# Check required arguments
# ==============================================================================
if [ -z "$SMALLTALK" ]; then
print_error "\$SMALLTALK is not defined!"
exit 1
elif [ -z "$PROJECT_HOME" ]; then
if [ -z "$PROJECT_HOME" ]; then
print_error "\$PROJECT_HOME is not defined!"
exit 1
elif [ -z "$BASELINE" ]; then
Expand All @@ -53,14 +50,8 @@ VM_IMAGE="$BUILD_PATH/TravisCI.image"
IMAGE_TAR="$SMALLTALK.tar.gz"
IMAGE_DOWNLOAD="https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/filetreeci/images"

SPUR_IMAGE=false
case "$SMALLTALK" in
"Squeak5.0" | "SqueakTrunk")
SPUR_IMAGE=true
;;
esac

# Optional environment variables
[ -z "$SMALLTALK" ] && SMALLTALK="Squeak5.0" # Set default Smalltalk version
[ -z "$PACKAGES" ] && PACKAGES="/packages"
[ -z "$BASELINE_GROUP" ] && BASELINE_GROUP="TravisCI"
[ -z "$EXCLUDE_CATEGORIES" ] && EXCLUDE_CATEGORIES="nil"
Expand All @@ -72,6 +63,13 @@ if [ -z "$RUN_SCRIPT" ]; then
else
RUN_SCRIPT="$PROJECT_HOME/$RUN_SCRIPT"
fi

SPUR_IMAGE=false
case "$SMALLTALK" in
"Squeak5.0" | "SqueakTrunk")
SPUR_IMAGE=true
;;
esac
# ==============================================================================

# Identify OS and select virtual machine
Expand Down Expand Up @@ -141,7 +139,7 @@ fi

# Export environment variables
# ==============================================================================
export COG_VM VM_IMAGE
export SMALLTALK COG_VM VM_IMAGE
# ==============================================================================

# Extract image and run on virtual machine
Expand Down Expand Up @@ -170,4 +168,4 @@ else
fi
printf "\n"

exit $EXIT_STATUS
exit $EXIT_STATUS

0 comments on commit 07fab2b

Please sign in to comment.