Skip to content

Commit

Permalink
chore(build): Refactor rockspec to dodge luarocks 3.1.3 bug
Browse files Browse the repository at this point in the history
Setting source.branch works for most cases, but when the branch is
actually a tag and not a branch then a Luarocks 3.1.3 bug rears and
tries to concatenate a nil. This dodges that bullet by setting
source.tag explicitly to not trigger the branch_or_tag concatenation.
  • Loading branch information
alerque committed Aug 23, 2022
1 parent f0f7ceb commit 365d948
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions say-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ local package_version = "scm"
local rockspec_revision = "1"
local github_account_name = "lunarmodules"
local github_repo_name = package_name
local git_checkout = package_version == "scm" and "master" or package_version

rockspec_format = "3.0"
package = package_name
version = package_version .. "-" .. rockspec_revision

source = {
url = "git+https://github.com/"..github_account_name.."/"..github_repo_name..".git",
branch = git_checkout
url = "git+https://github.com/"..github_account_name.."/"..github_repo_name..".git"
}

if package_version == "scm" then source.branch = "master" else source.tag = "v" .. package_version end

description = {
summary = "Lua string hashing/indexing library",
detailed = [[
Expand Down

0 comments on commit 365d948

Please sign in to comment.