This repository has been archived by the owner on Apr 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
pull.feature
38 lines (30 loc) · 1.9 KB
/
pull.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Feature: Pull
As a Software Developer
I want SDKMAN to be up-to-date
So that I can access the latest SDKs
https://github.com/sdkman/sdk/issues/4
Versions of SDKMAN prior to 6.0.0 were very reliant on being connected to the internet. For most this has not
been a problem, but for those with limited bandwidth or unreliable internet connectivity this has rendered the
CLI unusable.
One of the steps that was taken previously was to introduce an offline mode, allowing the CLI to continue working
even when no internet connection was present. The intent was to cause the CLI to degrade gracefully when:
a) no internet connectivity was available
b) when the `sdk offline enable` command was issued
Despite this being a noble effort, the implementation of this was troublesome due to the limitations of bash
and curl. To date this functionality still has serious issues.
This leads us to re-evaluating our options given a blank canvas. Looking at tools like Debian's Apt and DVCS systems
like Git, they all have functions that explicitly pull down remote state. In the case of Apt we have an `apt update`,
in the case of Git we have `git pull`.
The proposal is to follow this line of thinking, preventing continual API access on every command. Instead, an
explicit command such as `sdk pull` or `sdk update` should be issued in order to fetch remote state. If the sdk
command has not been updated in while, it should warn the user that their local state is out of date.
Scenario: The current available Version is pulled
Given the internet is reachable
And an initialised environment
And the installed sdkman version is "5.7.2"
And the available sdkman version is "6.0.0"
When I enter "sdk pull version"
Then the exit code is 0
And the pulled version state is "6.0.0"
And I see "Pulling available version..."
And I see "SDKMAN 6.0.0 now available for installation..."