Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:

strategy:
matrix:
otp_version: [23, 24, 26]
os: [ubuntu-20.04] # latest only runs >= 24.2
otp_version: [26, 27, 28]
os: [ubuntu-latest] # latest only runs >= 24.2

container:
image: erlang:${{ matrix.otp_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shelltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
# TODO: make a batch of tests that runs on nodetool rather
# than the new connectivity mechanism
otp_version: [25, 26]
otp_version: [26, 27, 28]
os: [ubuntu-latest] # latest only runs >= 24.2

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
otp_version: [24, 25, 26]
otp_version: [26, 27, 28]
os: [windows-latest]

steps:
Expand Down
3 changes: 2 additions & 1 deletion priv/templates/extended_bin_windows_ps
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ $service_name = "${rel_name}_${rel_vsn}"
$nodetool = "$rootdir\bin\nodetool"

$bindir = "$erts_dir\bin"
$werl = "$bindir\werl.exe"
# since OTP-26, werl.exe is just erl.exe, so link it directly
$werl = "$bindir\erl.exe"
$erl = "$bindir\erl.exe"
$erlsrv = "$bindir\erlsrv.exe"
$escript = "$bindir\escript.exe"
Expand Down
6 changes: 3 additions & 3 deletions priv/templates/psutil
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ function Find-ERTS()

# Get the ERTS dir from erl
$erl = (Get-Command erl).source
$erl_root = & $erl -boot no_dot_erlang -noshell -eval 'io:format(\"~s\", [filename:nativename(code:root_dir())]), halt().'
$erl_root = & $erl -boot no_dot_erlang -noshell -eval 'io:format("~s", [filename:nativename(code:root_dir())]), halt().'
if (Test-Path "$erl_root\erts-$Vsn") {
return @($erl_root, "$erl_root\erts-$Vsn")
}

# Expected $vsn but not found, get ERTS version installed
$erts_vsn = & $erl -boot no_dot_erlang -noshell -eval 'io:format(\"~s\", [erlang:system_info(version)]), halt().'
$erts_vsn = & $erl -boot no_dot_erlang -noshell -eval 'io:format("~s", [erlang:system_info(version)]), halt().'
if (!(Test-Path "$erl_root\erts-$erts_vsn")) {
Write-Error "Can not run the release. There is no ERTS bundled with the release or found on the system."
# Terminates here due to $ErrorActionPreference = "Stop"
Expand Down Expand Up @@ -172,4 +172,4 @@ function Get-Cookie()
}

return $cookie
}
}
15 changes: 12 additions & 3 deletions shelltests/wintest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ mkdir $rebar3_dir | Out-Null
# Clone latest rebar3 and build with relx as a checkout
Push-Location $rebar3_dir
& git clone "https://github.com/erlang/rebar3" .
mkdir _checkouts | Out-Null
New-Item -ItemType SymbolicLink -Path "_checkouts\relx" -Target "$PSScriptRoot\..\..\relx" | Out-Null
(Get-Content rebar.config) -replace 'relx(.*)build/default/lib/', 'relx$1checkouts' | Set-Content rebar.config -Encoding ASCII
Remove-Item -Path "vendor\relx\src\*" -Recurse -Force
Remove-Item -Path "vendor\relx\priv\*" -Recurse -Force
Remove-Item -Path "vendor\relx\rebar*" -Force
Copy-Item -Path "$PSScriptRoot\..\..\relx\src\*" -Destination "vendor\relx\src" -Recurse | Out-Null
Copy-Item -Path "$PSScriptRoot\..\..\relx\priv\*" -Destination "vendor\relx\priv" -Recurse | Out-Null
Copy-Item -Path "$PSScriptRoot\..\..\relx\rebar*" -Destination "vendor\relx" -Recurse #| Out-Null
cmd /c bootstrap.bat
Pop-Location
""
Expand Down Expand Up @@ -61,13 +64,19 @@ if ($LASTEXITCODE -ne 0) {
}
""

Get-Process | Out-String -Stream
Get-Service -Name powershell_release_0.1.0 | Out-String -Stream

"*** Start service"
& ".\$release.ps1" start
if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to start service"
}
""

Get-Process | Out-String -Stream
Get-Service -Name powershell_release_0.1.0 | Out-String -Stream

"*** Ping service"
& ".\$release.ps1" ping
if ($LASTEXITCODE -ne 0) {
Expand Down
4 changes: 4 additions & 0 deletions src/relx.erl
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ build_tar(RelName, Apps, State) when is_atom(RelName) ->
build_tar_(RealizedRelease, State),
{ok, RealizedRelease}.

%% Ignore Dialyzer warnings on this, `no_warn_sasl` is a valid option
%% but the `systools:make_relup/4` spec is outdated and this causes
%% warning as late as OTP-28, and all calls in the chain fail analysis in turn.
-dialyzer({nowarn_function, [build_relup/4]}).
-spec build_relup(rlx_release:name(), rlx_release:vsn(), rlx_release:vsn(), rlx_config:t() | rlx_state:t())
-> {ok, rlx_state:t()} | {error, term()}.
build_relup(RelName, ToVsn, UpFromVsn, Config) when is_list(Config) ->
Expand Down
4 changes: 4 additions & 0 deletions src/rlx_relup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
-include("relx.hrl").
-include("rlx_log.hrl").

%% Ignore Dialyzer warnings on this, `no_warn_sasl` is a valid option
%% but the `systools:make_relup/4` spec is outdated and this causes
%% warning as late as OTP-28, and all calls in the chain fail analysis in turn.
-dialyzer({nowarn_function, [do/4, make_upfrom_script/4]}).
-spec do(atom(), string(), string() | undefined, rlx_state:t()) -> {ok, rlx_state:t()} | relx:error().
do(RelName, ToVsn, undefined, State) ->
OutputDir = rlx_state:base_output_dir(State),
Expand Down
Loading