Skip to content

Commit

Permalink
chore: update alpha and stable Pharo version variables
Browse files Browse the repository at this point in the history
  • Loading branch information
theseion committed Apr 29, 2024
1 parent 294ce08 commit 6b81a43
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 22 deletions.
20 changes: 4 additions & 16 deletions pharo/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ pharo::get_image_url() {
"Pharo64-stable"|"Pharo-stable")
echo "get.pharo.org/64/stable"
;;
"Pharo64-13")
echo "get.pharo.org/64/130"
;;
"Pharo64-12")
echo "get.pharo.org/64/120"
;;
Expand Down Expand Up @@ -54,9 +51,6 @@ pharo::get_image_url() {
"Pharo32-stable")
echo "get.pharo.org/stable"
;;
"Pharo32-13")
echo "get.pharo.org/32/130"
;;
"Pharo32-12")
echo "get.pharo.org/32/120"
;;
Expand Down Expand Up @@ -151,19 +145,16 @@ moose::get_image_url() {
################################################################################
pharo::get_vm_url() {
local smalltalk_name=$1
local stable_version=11
local alpha_version=12
local stable_version=12
local alpha_version=13

case "${smalltalk_name}" in
# NOTE: vmLatestXX should be updated every time new Pharo is released
"Pharo64-alpha"|"Pharo-alpha")
echo "get.pharo.org/64/vmLatest${alpha_version}0"
;;
"Pharo64-stable"|"Pharo-stable")
echo "get.pharo.org/64/64/vm${stable_version}0"
;;
"Pharo64-13")
echo "get.pharo.org/64/vm130"
echo "get.pharo.org/64/vm${stable_version}0"
;;
"Pharo64-12")
echo "get.pharo.org/64/vm120"
Expand All @@ -175,7 +166,7 @@ pharo::get_vm_url() {
echo "get.pharo.org/64/vm100"
;;
"Pharo64-9.0"|"Moose64-9.0")
echo "get.pharo.org/vm90"
echo "get.pharo.org/64/vm90"
;;
"Pharo64-8.0"|"Moose64-8.0")
echo "get.pharo.org/64/vm80"
Expand All @@ -195,9 +186,6 @@ pharo::get_vm_url() {
"Pharo32-stable")
echo "get.pharo.org/vm${stable_version}0"
;;
"Pharo32-13")
echo "get.pharo.org/vm130"
;;
"Pharo32-12")
echo "get.pharo.org/vm120"
;;
Expand Down
41 changes: 35 additions & 6 deletions tests/pharo_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ test_get_image_url() {
image_url="$(pharo::get_image_url "Pharo64-stable")"
assertEquals "get.pharo.org/64/stable" "${image_url}"

image_url="$(pharo::get_image_url "Pharo64-13")"
assertEquals "get.pharo.org/64/130" "${image_url}"

image_url="$(pharo::get_image_url "Pharo64-12")"
assertEquals "get.pharo.org/64/120" "${image_url}"

Expand All @@ -37,6 +34,22 @@ test_get_image_url() {
image_url="$(pharo::get_image_url "Pharo64-8.0")"
assertEquals "get.pharo.org/64/80" "${image_url}"


image_url="$(pharo::get_image_url "Pharo32-12")"
assertEquals "get.pharo.org/32/120" "${image_url}"

image_url="$(pharo::get_image_url "Pharo32-11")"
assertEquals "get.pharo.org/32/110" "${image_url}"

image_url="$(pharo::get_image_url "Pharo32-10")"
assertEquals "get.pharo.org/32/100" "${image_url}"

image_url="$(pharo::get_image_url "Pharo32-9.0")"
assertEquals "get.pharo.org/32/90" "${image_url}"

image_url="$(pharo::get_image_url "Pharo32-8.0")"
assertEquals "get.pharo.org/80" "${image_url}"

image_url="$(pharo::get_image_url "Pharo32-7.0")"
assertEquals "get.pharo.org/70" "${image_url}"

Expand Down Expand Up @@ -66,17 +79,33 @@ test_get_vm_url() {
local vm_url

vm_url="$(pharo::get_vm_url "Pharo32-alpha")"
assertEquals "get.pharo.org/vmLatest120" "${vm_url}"
assertEquals "get.pharo.org/vmLatest130" "${vm_url}"

vm_url="$(pharo::get_vm_url "Pharo64-alpha")"
assertEquals "get.pharo.org/64/vmLatest120" "${vm_url}"
assertEquals "get.pharo.org/64/vmLatest130" "${vm_url}"

vm_url="$(pharo::get_vm_url "Pharo32-stable")"
assertEquals "get.pharo.org/vm110" "${vm_url}"
assertEquals "get.pharo.org/vm120" "${vm_url}"

vm_url="$(pharo::get_vm_url "Pharo64-stable")"
assertEquals "get.pharo.org/64/vm120" "${vm_url}"

vm_url="$(pharo::get_vm_url "Pharo64-12")"
assertEquals "get.pharo.org/64/vm120" "${vm_url}"

vm_url="$(pharo::get_vm_url "Pharo64-11")"
assertEquals "get.pharo.org/64/vm110" "${vm_url}"

vm_url="$(pharo::get_vm_url "Pharo64-10")"
assertEquals "get.pharo.org/64/vm100" "${vm_url}"

vm_url="$(pharo::get_vm_url "Pharo64-9.0")"
assertEquals "get.pharo.org/64/vm90" "${vm_url}"

vm_url="$(pharo::get_vm_url "Pharo64-8.0")"
assertEquals "get.pharo.org/64/vm80" "${vm_url}"


vm_url="$(pharo::get_vm_url "Pharo32-12")"
assertEquals "get.pharo.org/vm120" "${vm_url}"

Expand Down

0 comments on commit 6b81a43

Please sign in to comment.