Skip to content

Commit

Permalink
Add Elixir 1.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
d-stefanovic committed Dec 23, 2024
1 parent a167dd8 commit 893fa68
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 20 deletions.
2 changes: 1 addition & 1 deletion sem-install
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ install::install_elixir() {
"1.15"* | "1.16"*)
local erlang_version="26.2"
;;
"1.17"*)
"1.17"* | "1.18"*)
local erlang_version="27.0"
;;
*)
Expand Down
9 changes: 5 additions & 4 deletions sem-version
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ version::change_ruby() {
[[ "$software_version" == "2.7" ]] && software_version="2.7.8"
[[ "$software_version" == "3.0" ]] && software_version="3.0.7"
[[ "$software_version" == "3.1" ]] && software_version="3.1.6"
[[ "$software_version" == "3.2" ]] && software_version="3.2.5"
[[ "$software_version" == "3.3" ]] && software_version="3.3.5"
[[ "$software_version" == "3.2" ]] && software_version="3.2.6"
[[ "$software_version" == "3.3" ]] && software_version="3.3.6"

if ! [ -d ~/.rbenv/versions/"${software_version}" ]; then
sem-install ruby "${software_version}"
Expand All @@ -71,7 +71,8 @@ version::change_elixir() {
[[ "$software_version" == "1.14" ]] && software_version="1.14.5"
[[ "$software_version" == "1.15" ]] && software_version="1.15.8"
[[ "$software_version" == "1.16" ]] && software_version="1.16.3"
[[ "$software_version" == "1.17" ]] && software_version="1.17.2"
[[ "$software_version" == "1.17" ]] && software_version="1.17.3"
[[ "$software_version" == "1.18" ]] && software_version="1.18.0"


if [[ $(kiex list) != *"${software_version}"* ]];then
Expand Down Expand Up @@ -134,7 +135,7 @@ version::change_erlang() {
[[ "$software_version" == "24" ]] && software_version="24.3"
[[ "$software_version" == "25" ]] && software_version="25.3"
[[ "$software_version" == "26" ]] && software_version="26.2"
[[ "$software_version" == "27" ]] && software_version="27.0"
[[ "$software_version" == "27" ]] && software_version="27.2"

if [[ $(kerl list installations) != *"${software_version}"* ]]; then
sem-install erlang "${software_version}"
Expand Down
12 changes: 9 additions & 3 deletions tests/sem_version_focal/elixir.bats
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,14 @@ setup() {
assert_line --partial "Elixir 1.16.3"
}

@test "change elixir to 1.17.2" {
sem-version elixir 1.17.2
@test "change elixir to 1.17.3" {
sem-version elixir 1.17.3
run elixir --version
assert_line --partial "Elixir 1.17.2"
assert_line --partial "Elixir 1.17.3"
}

@test "change elixir to 1.18.0" {
sem-version elixir 1.18.0
run elixir --version
assert_line --partial "Elixir 1.18.0"
}
6 changes: 6 additions & 0 deletions tests/sem_version_focal/erlang.bats
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@ setup() {
run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
assert_line --partial "27"
}

@test "change erlang to 27.2" {
sem-version erlang 27.2
run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
assert_line --partial "27"
}
4 changes: 2 additions & 2 deletions tests/sem_version_focal/ruby.bats
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ setup() {
run sem-version ruby 3.2
assert_success
run ruby --version
assert_line --partial "ruby 3.2.5"
assert_line --partial "ruby 3.2.6"

run sem-version ruby 3.3
assert_success
run ruby --version
assert_line --partial "ruby 3.3.5"
assert_line --partial "ruby 3.3.6"
}

@test "change ruby to 4.0.1" {
Expand Down
12 changes: 9 additions & 3 deletions tests/sem_version_jammy/elixir.bats
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ setup() {
assert_line --partial "Elixir 1.16.3"
}

@test "change elixir to 1.17.2" {
sem-version elixir 1.17.2
@test "change elixir to 1.17.3" {
sem-version elixir 1.17.3
run elixir --version
assert_line --partial "Elixir 1.17.2"
assert_line --partial "Elixir 1.17.3"
}

@test "change elixir to 1.18.0" {
sem-version elixir 1.18.0
run elixir --version
assert_line --partial "Elixir 1.18.0"
}
6 changes: 6 additions & 0 deletions tests/sem_version_jammy/erlang.bats
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,9 @@ setup() {
run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
assert_line --partial "27"
}

@test "change erlang to 27.2" {
sem-version erlang 27.2
run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
assert_line --partial "27"
}
4 changes: 2 additions & 2 deletions tests/sem_version_jammy/ruby.bats
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ setup() {
run sem-version ruby 3.2
assert_success
run ruby --version
assert_line --partial "ruby 3.2.5"
assert_line --partial "ruby 3.2.6"

run sem-version ruby 3.3
assert_success
run ruby --version
assert_line --partial "ruby 3.3.5"
assert_line --partial "ruby 3.3.6"
}

@test "change ruby to 4.0.1" {
Expand Down
12 changes: 9 additions & 3 deletions tests/sem_version_noble/elixir.bats
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ setup() {
assert_line --partial "Elixir 1.16.3"
}

@test "change elixir to 1.17.2" {
sem-version elixir 1.17.2
@test "change elixir to 1.17.3" {
sem-version elixir 1.17.3
run elixir --version
assert_line --partial "Elixir 1.17.2"
assert_line --partial "Elixir 1.17.3"
}

@test "change elixir to 1.18.0" {
sem-version elixir 1.18.0
run elixir --version
assert_line --partial "Elixir 1.18.0"
}
6 changes: 6 additions & 0 deletions tests/sem_version_noble/erlang.bats
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,9 @@ setup() {
run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
assert_line --partial "27"
}

@test "change erlang to 27.2" {
sem-version erlang 27.2
run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
assert_line --partial "27"
}
4 changes: 2 additions & 2 deletions tests/sem_version_noble/ruby.bats
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ setup() {
run sem-version ruby 3.2
assert_success
run ruby --version
assert_line --partial "ruby 3.2.5"
assert_line --partial "ruby 3.2.6"

run sem-version ruby 3.3
assert_success
run ruby --version
assert_line --partial "ruby 3.3.5"
assert_line --partial "ruby 3.3.6"
}

@test "change ruby to 4.0.1" {
Expand Down

0 comments on commit 893fa68

Please sign in to comment.