Commit 714af62
committed
refactor: read the instance version through api.ServerVersion
The merge brought in `api.ServerVersion`, added by #86 for the same
purpose, so the version lookup added here was a second one in the same
package. Uses the shared function instead, which also stops going through
the 301 that `/version` (no trailing slash) answers with.
Adopts its rule about the tag, too: an instance reporting "latest" or a
commit sha now has its tag left out of the message rather than quoted
back as though it were a version. Nothing here rests on the tag — the 404
already established the endpoint is absent — so it only decides whether
the version can be named, where `login` has to stay silent entirely
because it is inferring age.
Dropped the `package_versions` fallback with it: it would be a change to
what `login` gates on, which wants deciding on its own terms.1 parent ceb54b2 commit 714af62
3 files changed
Lines changed: 43 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
990 | 991 | | |
991 | 992 | | |
992 | 993 | | |
993 | | - | |
994 | | - | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
995 | 1000 | | |
996 | | - | |
997 | | - | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
998 | 1007 | | |
999 | | - | |
| 1008 | + | |
1000 | 1009 | | |
1001 | 1010 | | |
1002 | 1011 | | |
1003 | 1012 | | |
1004 | 1013 | | |
1005 | 1014 | | |
1006 | 1015 | | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | 1016 | | |
1024 | 1017 | | |
1025 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
| 586 | + | |
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
612 | 638 | | |
613 | 639 | | |
614 | 640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| |||
0 commit comments