Skip to content
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

[ci] fix sh-compatibility issue in build-cran-package.sh #6118

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

jameslamb
Copy link
Collaborator

build-cran-package.sh is used to prepare a CRAN-style source distribution of this project's R package.

It's intentionally an sh and not bash script, to attempt to be as portable as possible.

I noticed tonight that that script is currently using one bash feature that isn't supported in at least some implementations of sh... [[ for an if condition.

See https://github.com/microsoft/LightGBM/actions/runs/6301758829/job/17107497663#step:7:7057.

build-cran-package.sh: 135: [[: not found

Or run the following from the root of this repo to reproduce it.

docker run \
    --rm \
    -v $(pwd):/opt/LightGBM \
    -w /opt/LightGBM \
    -it ghcr.io/r-hub/containers/ubuntu-clang:latest \
    sh build-cran-package.sh --no-build-vignettes

This PR fixes that.

@jameslamb jameslamb merged commit b7418dc into master Sep 29, 2023
39 checks passed
@jameslamb jameslamb deleted the r/cran-script-portability branch September 29, 2023 16:00
@jameslamb
Copy link
Collaborator Author

thanks as always @jmoralez !

Copy link

github-actions bot commented Jan 3, 2024

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants