mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-01-31 01:32:55 -05:00
Migrates to new latest broadcast endpoint.
This commit is contained in:
@@ -54,7 +54,7 @@ function gvm {
|
||||
if [[ "$GVM_FORCE_OFFLINE" == "true" || ( "$COMMAND" == "offline" && "$QUALIFIER" == "enable" ) ]]; then
|
||||
BROADCAST_LIVE=""
|
||||
else
|
||||
BROADCAST_LIVE=$(curl -s "${GVM_BROADCAST_SERVICE}/broadcast/${GVM_VERSION}")
|
||||
BROADCAST_LIVE=$(curl -s "${GVM_BROADCAST_SERVICE}/broadcast/latest")
|
||||
gvm_check_offline "$BROADCAST_LIVE"
|
||||
if [[ "$GVM_FORCE_OFFLINE" == 'true' ]]; then BROADCAST_LIVE=""; fi
|
||||
fi
|
||||
|
||||
@@ -8,7 +8,7 @@ And(~'^no prior Broadcast was received$') { ->
|
||||
}
|
||||
|
||||
And(~'^a new Broadcast "([^"]*)" is available$') { String broadcast ->
|
||||
primeEndpoint("/broadcast/$gvmVersion", broadcast)
|
||||
primeEndpoint("/broadcast/latest", broadcast)
|
||||
}
|
||||
|
||||
And(~'^a prior Broadcast "([^"]*)" was issued$') { String broadcast ->
|
||||
|
||||
@@ -35,8 +35,6 @@ And(~'^an initialised shell$') { ->
|
||||
}
|
||||
|
||||
And(~'^an outdated system$') { ->
|
||||
primeEndpoint("/broadcast/$gvmVersionOutdated", "This is a LIVE Broadcast!")
|
||||
|
||||
def initScript = "$gvmDir/bin/gvm-init.sh" as File
|
||||
initScript.text = initScript.text.replace(gvmVersion, gvmVersionOutdated)
|
||||
}
|
||||
@@ -47,7 +45,7 @@ And(~'^I reinitialise the shell$') { ->
|
||||
}
|
||||
|
||||
And(~'^the internet is reachable$') {->
|
||||
primeEndpoint("/broadcast/$gvmVersion", "This is a LIVE Broadcast!")
|
||||
primeEndpoint("/broadcast/latest", "This is a LIVE Broadcast!")
|
||||
|
||||
forcedOffline = false
|
||||
online = true
|
||||
@@ -63,7 +61,7 @@ And(~'^the internet is not reachable$') {->
|
||||
}
|
||||
|
||||
And(~'^offline mode is disabled with reachable internet$') {->
|
||||
primeEndpoint("/broadcast/$gvmVersion", "This is a LIVE Broadcast!")
|
||||
primeEndpoint("/broadcast/latest", "This is a LIVE Broadcast!")
|
||||
|
||||
forcedOffline = false
|
||||
online = true
|
||||
@@ -72,7 +70,7 @@ And(~'^offline mode is disabled with reachable internet$') {->
|
||||
}
|
||||
|
||||
And(~'^offline mode is enabled with reachable internet$') {->
|
||||
primeEndpoint("/broadcast/$gvmVersion", "This is a LIVE Broadcast!")
|
||||
primeEndpoint("/broadcast/latest", "This is a LIVE Broadcast!")
|
||||
|
||||
forcedOffline = true
|
||||
online = true
|
||||
|
||||
Reference in New Issue
Block a user