Skip to content

bugfix: fix tarantoolctl rocks on 1.10 #57

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

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,32 @@ jobs:
- name: Verify that the previous step fails
run: |
[ "${{ steps.install.outcome }}" = "failure" ]

test-rocks:
# Ubuntu Jammy (22.04) has tarantool-2.6.0 in its repository.
# The test verifies that tarantool-common-2.6.0 is not pulled
# as a dependency, so this particular Ubuntu version is
# acquired explicitly.
runs-on: ubuntu-22.04
env:
TARANTOOL_CACHE_KEY_SUFFIX: -I-${{ github.run_id }}
steps:
- uses: actions/checkout@v4

# Verify non-cached installation. The cached one has exactly
# same luarocks, no need to verify it.
- name: Install 1.10
uses: ./
with:
tarantool-version: '1.10'

# If luarocks 3 is installed instead of luarocks 2, this
# command fails with the following error message.
#
# > module 'luarocks.core.cfg' not found
#
# See https://github.com/tarantool/tarantool/issues/5429 for
# details.
- name: Verify tarantoolctl rocks
run: |
tarantoolctl rocks list
10 changes: 9 additions & 1 deletion dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,17 @@ async function run_linux(): Promise<void> {
core.startGroup('Installing tarantool')

const dpkg_before = await dpkg_list()
await exec.exec(
`sudo apt-get install -y tarantool=${version}* tarantool-dev=${version}*`
)

/*
* The series-3 repository doesn't offer the tarantool-common
* package.
*/
let pkgs = [`tarantool=${version}*`, `tarantool-dev=${version}*`]
if (tarantool_version_major() < 3) {
pkgs.push(`tarantool-common=${version}*`)
}
await exec.exec('sudo apt-get install -y ' + pkgs.join(' '))

const dpkg_after = await dpkg_list()

const dpkg_diff: Array<string> = Array.from(dpkg_after.values()).filter(
Expand Down