diff options
| author | V1K1NGbg <victor@ilchev.com> | 2024-08-22 17:49:05 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-10-21 13:30:51 -0300 |
| commit | e1b0b8234fb97e98686e557ed90a8f01019927c3 (patch) | |
| tree | 4cb8d5d6dc32c78ab257eb969153f72306f9879b /src | |
| parent | 5a3fab9fca93c6f586b9bd34954a1bf3e9d2ea4f (diff) | |
| download | luarocks-e1b0b8234fb97e98686e557ed90a8f01019927c3.tar.gz luarocks-e1b0b8234fb97e98686e557ed90a8f01019927c3.tar.bz2 luarocks-e1b0b8234fb97e98686e557ed90a8f01019927c3.zip | |
Teal: convert luarocks.fetch.git_file
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/fetch/git_file.tl (renamed from src/luarocks/fetch/git_file.lua) | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/luarocks/fetch/git_file.lua b/src/luarocks/fetch/git_file.tl index 8d46bbca..90e14d12 100644 --- a/src/luarocks/fetch/git_file.lua +++ b/src/luarocks/fetch/git_file.tl | |||
| @@ -1,9 +1,12 @@ | |||
| 1 | 1 | ||
| 2 | --- Fetch back-end for retrieving sources from local Git repositories. | 2 | --- Fetch back-end for retrieving sources from local Git repositories. |
| 3 | local git_file = {} | 3 | local record git_file |
| 4 | end | ||
| 4 | 5 | ||
| 5 | local git = require("luarocks.fetch.git") | 6 | local git = require("luarocks.fetch.git") |
| 6 | 7 | ||
| 8 | local type Rockspec = require("luarocks.core.types.rockspec").Rockspec | ||
| 9 | |||
| 7 | --- Fetch sources for building a rock from a local Git repository. | 10 | --- Fetch sources for building a rock from a local Git repository. |
| 8 | -- @param rockspec table: The rockspec table | 11 | -- @param rockspec table: The rockspec table |
| 9 | -- @param extract boolean: Unused in this module (required for API purposes.) | 12 | -- @param extract boolean: Unused in this module (required for API purposes.) |
| @@ -11,7 +14,7 @@ local git = require("luarocks.fetch.git") | |||
| 11 | -- @return (string, string) or (nil, string): The absolute pathname of | 14 | -- @return (string, string) or (nil, string): The absolute pathname of |
| 12 | -- the fetched source tarball and the temporary directory created to | 15 | -- the fetched source tarball and the temporary directory created to |
| 13 | -- store it; or nil and an error message. | 16 | -- store it; or nil and an error message. |
| 14 | function git_file.get_sources(rockspec, extract, dest_dir) | 17 | function git_file.get_sources(rockspec: Rockspec, extract: boolean, dest_dir?: string): string, string |
| 15 | rockspec.source.url = rockspec.source.url:gsub("^git.file://", "") | 18 | rockspec.source.url = rockspec.source.url:gsub("^git.file://", "") |
| 16 | return git.get_sources(rockspec, extract, dest_dir) | 19 | return git.get_sources(rockspec, extract, dest_dir) |
| 17 | end | 20 | end |
