From 4370a117e496f64827e5bae96f2bb19af97b66cd Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 24 Aug 2022 15:14:23 +0300 Subject: [PATCH 1/3] chore(ci): Bump Luacheck action, upstream now uses semver stable tag --- .github/workflows/luacheck.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml index 2f20456a..ffcb08fe 100644 --- a/.github/workflows/luacheck.yml +++ b/.github/workflows/luacheck.yml @@ -1,13 +1,13 @@ name: Luacheck -on: [push, pull_request] +on: [ push, pull_request ] jobs: luacheck: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 - name: Luacheck - uses: lunarmodules/luacheck@v0 + uses: lunarmodules/luacheck@v1 From 86f03796dcb08deb510abda81d3e4c7bfa6acbc7 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Fri, 26 Aug 2022 15:30:39 +0300 Subject: [PATCH 2/3] chore(ci): Add workflow to test-build rockspec changes --- .github/workflows/rockspec.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/rockspec.yml diff --git a/.github/workflows/rockspec.yml b/.github/workflows/rockspec.yml new file mode 100644 index 00000000..9bfe352b --- /dev/null +++ b/.github/workflows/rockspec.yml @@ -0,0 +1,15 @@ +name: Deploy + +on: [ push, workflow_dispatch ] + +jobs: + + affected: + uses: lunarmodules/.github/.github/workflows/list_affected_rockspecs.yml@main + + build: + needs: affected + if: ${{ needs.affected.outputs.rockspecs }} + uses: lunarmodules/.github/.github/workflows/test_build_rock.yml@main + with: + rockspecs: ${{ needs.affected.outputs.rockspecs }} From 189393c74aab8e32c909aa1477fef95194b85c62 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 24 Aug 2022 15:17:42 +0300 Subject: [PATCH 3/3] 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. All the other changes are cosmetic and for readability/maintainability. --- penlight-dev-1.rockspec | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/penlight-dev-1.rockspec b/penlight-dev-1.rockspec index 5b00e113..7bd49fdc 100644 --- a/penlight-dev-1.rockspec +++ b/penlight-dev-1.rockspec @@ -1,18 +1,16 @@ -local package_name = "penlight" -local package_version = "dev" -local rockspec_revision = "1" -local github_account_name = "lunarmodules" -local github_repo_name = package_name -local git_checkout = package_version == "dev" and "master" or package_version - +package = "penlight" +local rock_version = "dev" +local rock_release = "1" +local namespace = "lunarmodules" +local repository = package rockspec_format = "3.0" -package = package_name -version = package_version .. "-" .. rockspec_revision +version = ("%s-%s"):format(rock_version, rock_release) source = { - url = "git+https://github.com/"..github_account_name.."/"..github_repo_name..".git", - branch = git_checkout + url = ("git+https://github.com/%s/%s.git"):format(namespace, repository), + branch = rock_version == "dev" and "master" or nil, + tag = rock_version ~= "dev" and rock_version or nil, } description = { @@ -24,8 +22,8 @@ description = { Much of the functionality is inspired by the Python standard libraries. ]], license = "MIT/X11", - homepage = "https://"..github_account_name..".github.io/"..github_repo_name, - issues_url = "https://github.com/"..github_account_name.."/"..github_repo_name.."/issues", + homepage = ("https://%s.github.io/%s"):format(namespace, repository), + issues_url = ("https://github.com/%s/%s/issues"):format(namespace, repository), maintainer = "thijs@thijsschreijer.nl", }