Skip to content

Commit 85e903e

Browse files
committed
💩 Use lua-requests-temp
1 parent 7e80722 commit 85e903e

File tree

5 files changed

+97
-74
lines changed

5 files changed

+97
-74
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,30 @@
1010
- doc/*
1111
workflow_dispatch:
1212

13-
# https://github.com/softprops/action-gh-release/issues/236
14-
permissions:
15-
contents: write
13+
# Prevent concurrent auto-commits
14+
concurrency:
15+
group: auto-commit
16+
cancel-in-progress: true
1617

1718
jobs:
1819
build:
1920
runs-on: ubuntu-latest
2021
steps:
2122
- uses: actions/checkout@v4
22-
- uses: leafo/gh-actions-lua@v10
23-
with:
24-
luaVersion: "5.1"
25-
- uses: leafo/gh-actions-luarocks@v4
26-
- name: Build
27-
run: |
28-
luarocks install --local \
29-
--tree ~/work/code-stats.nvim/code-stats.nvim/.luarocks \
30-
assets/rockspecs/xml-1.1.3-1.rockspec
31-
luarocks pack ./*.rockspec
32-
luarocks build
33-
luarocks pack code-stats.nvim
34-
- uses: actions/upload-artifact@v4
23+
- uses: nvim-neorocks/luarocks-tag-release@v7
24+
env:
25+
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
3526
if: "! startsWith(github.ref, 'refs/tags/')"
3627
with:
37-
path: |
38-
*.rock
39-
- uses: softprops/action-gh-release@v2
28+
extra_luarocks_args: |
29+
--force
30+
version: scm
31+
template: template.rockspec
32+
- uses: nvim-neorocks/luarocks-tag-release@v5
33+
env:
34+
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
4035
if: startsWith(github.ref, 'refs/tags/')
4136
with:
42-
# body_path: build/CHANGELOG.md
43-
files: |
44-
*.rock
45-
- name: Upload
46-
# if: startsWith(github.ref, 'refs/tags/')
47-
run: |
48-
luarocks install luajson
49-
luarocks upload --force --api-key ${{secrets.LUAROCKS_API_KEY}} \
50-
./*.rockspec
37+
extra_luarocks_args: |
38+
--force
39+
template: template.rockspec

code-stats.nvim-scm-1.rockspec

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package = "lua-requests-temp"
2+
version = "1.2-3"
3+
local git_ref = '1.2-1'
4+
local repo_url = 'https://github.com/JakobGreen/lua-requests'
5+
source = {
6+
url = repo_url .. '/archive/' .. git_ref .. '.zip',
7+
dir = 'lua-requests-' .. git_ref,
8+
}
9+
description = {
10+
summary = "HTTP requests made easy! Support for HTTPS, Basic Auth, Digest Auth. HTTP response parsing has never been easier!",
11+
detailed = [[Similar to Requests for python.
12+
The goal of lua-requests is to make HTTP simple and easy to use.
13+
Currently HTTPS, Basic Authentication, and Digest Authentication are supported.
14+
Checkout the wiki on the github page for more details. Written in pure lua!
15+
]],
16+
homepage = "http://github.com/JakobGreen/lua-requests",
17+
license = "MIT"
18+
}
19+
dependencies = {
20+
"lua >= 5.1",
21+
"luasocket",
22+
"md5",
23+
"lua-cjson",
24+
"xml-temp",
25+
"luasec >= 0.5.1, < 0.8-1"
26+
}
27+
build = {
28+
type = "builtin",
29+
modules = {
30+
requests = "src/requests.lua"
31+
}
32+
}
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
package = "xml"
2-
version = "1.1.3-1"
1+
package = "xml-temp"
2+
version = "1.1.4-1"
3+
local git_ref = '3eb208a4c9847659d0e7856781e821a62f9c6de6'
4+
local repo_url = 'https://github.com/lubyk/xml'
35
source = {
4-
url = 'git://github.com/lubyk/xml',
5-
dir = 'xml',
6+
url = repo_url .. '/archive/' .. git_ref .. '.zip',
7+
dir = 'xml-' .. git_ref,
68
}
79
description = {
810
summary = "Very fast xml parser based on RapidXML",

template.rockspec

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
local git_ref = '$git_ref'
2+
local modrev = '$modrev'
3+
local specrev = '$specrev'
4+
5+
local repo_url = '$repo_url'
6+
7+
rockspec_format = '3.0'
8+
package = '$package'
9+
version = modrev ..'-'.. specrev
10+
11+
description = {
12+
summary = '$summary',
13+
detailed = $detailed_description,
14+
labels = $labels,
15+
homepage = '$homepage',
16+
$license
17+
}
18+
19+
dependencies = { 'lua >= 5.1', 'lua-requests-temp', 'lua-dotenv' }
20+
21+
test_dependencies = $test_dependencies
22+
23+
source = {
24+
url = repo_url .. '/archive/' .. git_ref .. '.zip',
25+
dir = '$repo_name-' .. '$archive_dir_suffix',
26+
}
27+
28+
if modrev == 'scm' or modrev == 'dev' then
29+
source = {
30+
url = repo_url:gsub('https', 'git')
31+
}
32+
end
33+
34+
build = {
35+
type = 'builtin',
36+
copy_directories = { 'plugin', 'assets', 'scripts' } ,
37+
install = {
38+
conf = {
39+
['..'] = 'shell.nix',
40+
},
41+
},
42+
}

0 commit comments

Comments
 (0)