From 365d94890315f1f1a4666fbbabfea40b14e80465 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 23 Aug 2022 18:13:17 +0300 Subject: [PATCH] chore(build): Refactor rockspec to dodge luarocks 3.1.3 bug 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. --- say-scm-1.rockspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/say-scm-1.rockspec b/say-scm-1.rockspec index 09c8bc3..78cf787 100644 --- a/say-scm-1.rockspec +++ b/say-scm-1.rockspec @@ -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 = [[