Skip to content

Commit 5797631

Browse files
committed
⏪ Revert "🏗️ Use luarocks-build-embedded-rockspecs"
This reverts commit 762f79f.
1 parent 762f79f commit 5797631

File tree

5 files changed

+83
-68
lines changed

5 files changed

+83
-68
lines changed

.github/workflows/main.yml

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

13+
# https://github.com/softprops/action-gh-release/issues/236
14+
permissions:
15+
contents: write
16+
1317
jobs:
1418
build:
1519
runs-on: ubuntu-latest
1620
steps:
1721
- uses: actions/checkout@v4
18-
- uses: nvim-neorocks/luarocks-tag-release@v7
19-
env:
20-
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
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
2135
if: "! startsWith(github.ref, 'refs/tags/')"
2236
with:
23-
extra_luarocks_args: |
24-
--force
25-
version: scm
26-
- uses: nvim-neorocks/luarocks-tag-release@v5
27-
env:
28-
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
37+
path: |
38+
*.rock
39+
- uses: softprops/action-gh-release@v2
2940
if: startsWith(github.ref, 'refs/tags/')
3041
with:
31-
extra_luarocks_args: |
32-
--force
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

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
hooks:
2626
- id: remove-crlf
2727
- repo: https://github.com/codespell-project/codespell
28-
rev: v2.4.0
28+
rev: v2.3.0
2929
hooks:
3030
- id: codespell
3131
additional_dependencies:
@@ -37,23 +37,23 @@ repos:
3737
args:
3838
- --msg-filename
3939
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
40-
rev: 3.1.3
40+
rev: 3.0.3
4141
hooks:
4242
- id: editorconfig-checker
4343
- repo: https://github.com/jumanjihouse/pre-commit-hooks
4444
rev: 3.0.0
4545
hooks:
4646
- id: check-mailmap
4747
- repo: https://github.com/rhysd/actionlint
48-
rev: v1.7.7
48+
rev: v1.7.4
4949
hooks:
5050
- id: actionlint
5151
- repo: https://github.com/adrienverge/yamllint
5252
rev: v1.35.1
5353
hooks:
5454
- id: yamllint
5555
- repo: https://github.com/executablebooks/mdformat
56-
rev: 0.7.21
56+
rev: 0.7.19
5757
hooks:
5858
- id: mdformat
5959
additional_dependencies:
@@ -67,7 +67,7 @@ repos:
6767
- mdformat-config
6868
- mdformat-web
6969
- repo: https://github.com/DavidAnson/markdownlint-cli2
70-
rev: v0.17.2
70+
rev: v0.16.0
7171
hooks:
7272
- id: markdownlint-cli2
7373
additional_dependencies:

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434

3535
## Install
3636

37+
**NOTE**: upstream xml has been [broken](https://github.com/lubyk/xml/pull/20).
38+
use the [fork](assets/rockspecs/xml-1.1.3-1.rockspec) before installing.
39+
3740
### rocks.nvim
3841

3942
#### Command style
Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,3 @@
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-
build_dependencies = { 'luarocks-build-embedded-rockspecs' }
20-
21-
dependencies = { 'lua >= 5.1', 'lua-requests', 'lua-dotenv' }
22-
23-
test_dependencies = $test_dependencies
24-
25-
source = {
26-
url = repo_url .. '/archive/' .. git_ref .. '.zip',
27-
dir = '$repo_name-' .. '$archive_dir_suffix',
28-
}
29-
30-
if modrev == 'scm' or modrev == 'dev' then
31-
source = {
32-
url = repo_url:gsub('https', 'git')
33-
}
34-
end
35-
36-
build = {
37-
type = "embedded-rockspecs",
38-
delegate_type = "builtin",
39-
copy_directories = $copy_directories,
40-
install = {
41-
conf = {
42-
['..'] = 'shell.nix',
43-
['../scripts/update.sh'] = 'scripts/update.sh',
44-
['../scripts/get-OPENSSL_INCDIR.nix'] = 'scripts/get-OPENSSL_INCDIR.nix',
45-
['../scripts/get-OPENSSL_LIBDIR.nix'] = 'scripts/get-OPENSSL_LIBDIR.nix',
46-
['../scripts/get-STDCPP_LIBDIR.nix'] = 'scripts/get-STDCPP_LIBDIR.nix',
47-
},
48-
},
49-
rockspecs = {
50-
[==[
511
package = "xml"
522
version = "1.1.3-1"
533
source = {
@@ -122,5 +72,3 @@ build = {
12272
},
12373
},
12474
}
125-
]==],
126-
}

code-stats.nvim-scm-1.rockspec

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
local git_ref = 'scm'
2+
local modrev = git_ref
3+
local specrev = '1'
4+
5+
local repo_url = 'https://github.com/Freed-Wu/code-stats.nvim'
6+
7+
rockspec_format = '3.0'
8+
package = 'code-stats.nvim'
9+
version = modrev ..'-'.. specrev
10+
11+
description = {
12+
summary = 'Code::Stats plugin for Neovim',
13+
detailed = '',
14+
labels = { 'vim', 'lua', 'neovim', 'code-stats' },
15+
homepage = 'https://github.com/Freed-Wu/code-stats.nvim',
16+
license = 'GPL-3.0'
17+
}
18+
19+
dependencies = { 'lua >= 5.1', 'lua-requests', 'lua-dotenv' }
20+
21+
test_dependencies = { }
22+
23+
source = {
24+
url = repo_url .. '/archive/' .. git_ref .. '.zip',
25+
dir = 'code-stats.nvim-' .. modrev,
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' } ,
37+
install = {
38+
conf = {
39+
['..'] = 'shell.nix',
40+
['../scripts/update.sh'] = 'scripts/update.sh',
41+
['../scripts/get-OPENSSL_INCDIR.nix'] = 'scripts/get-OPENSSL_INCDIR.nix',
42+
['../scripts/get-OPENSSL_LIBDIR.nix'] = 'scripts/get-OPENSSL_LIBDIR.nix',
43+
['../scripts/get-STDCPP_LIBDIR.nix'] = 'scripts/get-STDCPP_LIBDIR.nix',
44+
},
45+
},
46+
}

0 commit comments

Comments
 (0)