-
Notifications
You must be signed in to change notification settings - Fork 243
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
Tweak rockspec to pass CI again #444
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the concatenations are easier to read for non-Lua folks than the format-placeholder approach. |
||
|
||
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, | ||
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this I like, I have switched other rockspecs to this as well. Wondering if it is worthwhile to remove the hardcoded local default_branch = "master" |
||
} | ||
|
||
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 = "[email protected]", | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the vertical alignment of the "local"s, aesthetically. Despite this is just copying one variable into another.
(hence also the 2 lines white-space below to accentuate the vertical alignment above)