Commit b36b7a6
committed
feat: added gitlab support, simplified version sorting with ls-remote
This allows for easier access to both GitHub and GitLab releases,
without having to modify anything new.
It also simplifies sorting by using git ls-remote's built-in --sort
functionality. Since not all projects strictly follow semver, attempts
were made to normalize it, such as if there is no `-` between a patch
version and `rc`, `prerelease`, etc.
NOTE: this does require git >= 2.18.0, so that is checked for.
It also removes the -C - parameter from curl, which was attempting to
resume downloads, querying the server for the byte range to do so. This
is not universally supported, and if the server doesn't support it, the
download will fail.
Finally, where possible, it uses shell built-ins like parameter
substitution over calling external commands. If this isn't possible, it
minimizes the number of spawned subshells by combining commands rather
than piping. This speeds up the asdf ecosystem as a whole, by minimizing syscalls.1 parent 62d1095 commit b36b7a6
2 files changed
+35
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
14 | 24 | | |
15 | 25 | | |
16 | 26 | | |
17 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
18 | 33 | | |
19 | 34 | | |
| 35 | + | |
| 36 | + | |
20 | 37 | | |
21 | 38 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
31 | 45 | | |
32 | 46 | | |
33 | 47 | | |
34 | 48 | | |
35 | 49 | | |
36 | | - | |
| 50 | + | |
37 | 51 | | |
38 | 52 | | |
39 | 53 | | |
| |||
42 | 56 | | |
43 | 57 | | |
44 | 58 | | |
45 | | - | |
46 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
47 | 65 | | |
48 | | - | |
| 66 | + | |
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
| |||
0 commit comments