Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish to luarocks #1630

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Freed-Wu
Copy link
Contributor

@glacambre
Copy link
Owner

Thanks! Sorry for taking a little bit of time merging this, I need to get familiar with luarocks and review luarocks-tag-release before merging :)

@Freed-Wu
Copy link
Contributor Author

I found the reason. We need package package.json to luarocks package, bacause let l:version = json_decode(join(readfile(l:package_json), "\n"))['version'] need it.

@Freed-Wu
Copy link
Contributor Author

Now this can work ❤️

local git_ref = '3edc0fa3ade8e59428025f5eeaa4f1ae249997f7'
local modrev = 'scm'
local specrev = '1'

local repo_url = 'https://github.com/Freed-Wu/firenvim'

rockspec_format = '3.0'
package = 'firenvim'
version = modrev ..'-'.. specrev

description = {
  summary = 'Embed Neovim in Chrome, Firefox & others.',
  detailed = '',
  labels = { },
  homepage = 'https://github.com/Freed-Wu/firenvim',
  license = 'GPL-3.0'
}

dependencies = { 'lua >= 5.1' } 

test_dependencies = { }

source = {
  url = repo_url .. '/archive/' .. git_ref .. '.zip',
  dir = 'firenvim-' .. '3edc0fa3ade8e59428025f5eeaa4f1ae249997f7',
}

if modrev == 'scm' or modrev == 'dev' then
  source = {
    url = repo_url:gsub('https', 'git')
  }
end

build = {
  type = 'builtin',
  copy_directories = { 'autoload', 'plugin' } ,
  install = {
    conf = {
      ['..'] = 'package.json'
    }
  }
}

@Freed-Wu
Copy link
Contributor Author

Any other problem? Set LUAROCKS_API_KEY to github secret, and accept this PR,, the plugin will be publish to luarocks.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants