aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV1K1NGbg <victor@ilchev.com>2024-08-22 17:49:05 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-10-21 13:30:51 -0300
commite1b0b8234fb97e98686e557ed90a8f01019927c3 (patch)
tree4cb8d5d6dc32c78ab257eb969153f72306f9879b
parent5a3fab9fca93c6f586b9bd34954a1bf3e9d2ea4f (diff)
downloadluarocks-e1b0b8234fb97e98686e557ed90a8f01019927c3.tar.gz
luarocks-e1b0b8234fb97e98686e557ed90a8f01019927c3.tar.bz2
luarocks-e1b0b8234fb97e98686e557ed90a8f01019927c3.zip
Teal: convert luarocks.fetch.git_file
-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.
3local git_file = {} 3local record git_file
4end
4 5
5local git = require("luarocks.fetch.git") 6local git = require("luarocks.fetch.git")
6 7
8local 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.
14function git_file.get_sources(rockspec, extract, dest_dir) 17function 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)
17end 20end