Skip to content

Commit

Permalink
chore: apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
theseion authored and fniephaus committed Feb 12, 2024
1 parent d652eff commit f163c90
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ print_help() {
OPTIONS:
--clean Clear cache and delete builds.
-d | --debug Enable debug mode.
--force-cache Force use of the cache for all images (overrides '--overrwrite-cache').
--force-cache Force use of the cache for all images (overrides '--overwrite-cache').
-h | --help Show this help text.
--headful Open vm in headful mode and do not close image.
--image Custom image for build (Squeak/Pharo).
--install Install symlink to this smalltalkCI instance.
-o |--overwrite-cache Download the newest image and cache it.
--overwrite-cache Download the newest image and cache it.
--print-env Print all environment variables used by smalltalkCI
--no-color Disable colored output
--no-tracking Disable collection of anonymous build metrics (Travis CI & AppVeyor only).
Expand Down
4 changes: 2 additions & 2 deletions pharo/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ pharo::prepare_image() {
mkdir "${target}"
fi
if ! is_file "${target}"/*.image; then
pushd "${target}" >/dev/null
pushd "${target}" > /dev/null
fold_start download_image "Downloading ${smalltalk_name} image..."
download_file "${pharo_image_url}" "${pharo_zeroconf}"
retry 3 "bash ${pharo_zeroconf}"
fold_end download_image
popd >/dev/null
popd > /dev/null
fi

print_info "Preparing Pharo image..."
Expand Down
31 changes: 15 additions & 16 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -281,24 +281,23 @@ validate_configuration() {
}

################################################################################
# Set options that depend on the contex, i.e., the input values and selections
# Set options that depend on the context, i.e., the input values and selections
# performed so far.
################################################################################
set_context_options() {
if [ "${config_force_cache}" = "true" ]; then
print_info "Forcing cache use"
config_overwrite_cache="false"
return
fi

case "${config_smalltalk}" in
*-alpha | *-trunk)
print_info "Forcing image update for in-development version"
config_overwrite_cache="true"
;;
*)
;;
esac
if [[ "${config_force_cache}" = "true" ]]; then
print_info "Forcing cache use"
config_overwrite_cache="false"
else
case "${config_smalltalk}" in
*-alpha | *-trunk)
print_info "Forcing image update for in-development version"
config_overwrite_cache="true"
;;
*)
;;
esac
fi
}

################################################################################
Expand Down Expand Up @@ -358,7 +357,7 @@ parse_options() {
config_tracking="false"
shift
;;
-o | --overwrite-cache)
--overwrite-cache)
config_overwrite_cache="true"
shift
;;
Expand Down

0 comments on commit f163c90

Please sign in to comment.