-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jq '.plugins[] | select(.name == nvim-telescope/telescope-fzf-native.nvim)' plugins.json > ~/luarocks-tag-release/test.json
- Loading branch information
Showing
3 changed files
with
77 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,69 @@ | ||
#!/usr/bin/env lua | ||
local json = require('dkjson') | ||
|
||
json.decode(github_event_data) | ||
local input = io.stdin:read('*all') | ||
-- print('You entered: ' .. input) | ||
|
||
local input = io.stdin:read("*all") | ||
print("You entered: " .. input) | ||
meta = json.decode(input) | ||
|
||
package_name = input.name | ||
dependencies = input.dependencies | ||
license = input.license | ||
-- split after the | ||
package_name = meta.shorthand | ||
dependencies = meta.dependencies | ||
license = meta.license | ||
summary = meta.summary | ||
-- server_url = | ||
meta.repo_name = package_name | ||
meta.github_repo = meta.name | ||
meta.git_ref = 'main' -- TODO adjust | ||
meta.detailed_description_lines = '' | ||
meta.copy_directories = meta.extra_directories | ||
meta.labels = { 'neovim' } | ||
meta.test_dependencies = {} | ||
|
||
local rockspec = require('ltr.rockspec').generate( | ||
package_name, modrev, specrev, rockspec_template, | ||
{ | ||
ref_type = args.ref_type, | ||
git_server_url = args.git_server_url, | ||
github_repo = args.github_repo, | ||
license = args.license, | ||
git_ref = args.git_ref, | ||
summary = args.summary, | ||
detailed_description_lines = args.detailed_description_lines, | ||
dependencies = args.dependencies, | ||
test_dependencies = args.test_dependencies, | ||
labels = args.labels, | ||
copy_directories = args.copy_directories, | ||
repo_name = args.repo_name, | ||
github_event_tbl = github_event_tbl, | ||
}) | ||
-- TODO split | ||
-- meta.dependencies = meta.dependencies | ||
meta.git_server_url = 'https://github.com' | ||
-- meta["github_repo"] = "lol" | ||
-- print(meta.github_repo) | ||
|
||
local result = {} | ||
-- if dependencies is empty then we | ||
-- for line in string.gmatch(meta.dependencies .. "\n", "(.-)\n") do | ||
-- table.insert(result, line); | ||
-- end | ||
|
||
meta.dependencies = result | ||
-- print(meta.dependencies) | ||
|
||
local rockspec_template_file_path = './resources/rockspec.template' | ||
-- rockspec_template_file_path | ||
local rockspec_template_fd = | ||
assert(io.open(rockspec_template_file_path, 'r'), 'Could not open ' .. rockspec_template_file_path) | ||
local rockspec_template = rockspec_template_fd:read('*a') | ||
|
||
local specrev = 1 | ||
local modrev = 1 | ||
local rockspec = require('ltr.rockspec').generate( | ||
package_name, | ||
modrev, | ||
specrev, | ||
rockspec_template, | ||
meta | ||
-- { | ||
-- -- ref_type = args.ref_type, | ||
-- -- git_server_url = args.git_server_url, | ||
-- -- github_repo = args.github_repo, | ||
-- license = license, | ||
-- -- git_ref = args.git_ref, | ||
-- summary = summary, | ||
-- -- detailed_description_lines = args.detailed_description_lines, | ||
-- -- dependencies = args.dependencies, | ||
-- -- test_dependencies = args.test_dependencies, | ||
-- -- labels = args.labels, | ||
-- -- copy_directories = args.copy_directories, | ||
-- -- repo_name = args.repo_name, | ||
-- github_event_tbl = meta, | ||
-- } | ||
) | ||
|
||
print(rockspec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ description = { | |
|
||
dependencies = { | ||
'lua >= 5.1', | ||
'argparse', | ||
'dkjson', | ||
'luafilesystem', | ||
} | ||
|