-
-
Notifications
You must be signed in to change notification settings - Fork 807
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
Include both shell and ps1 entrypoint scripts with gleam export erlan… #4364
Conversation
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.
Thank you! Could you update the changelog also please 🙏
It would be great to also update the CI workflow to test that both files to ensure they exist
gleam/.github/workflows/ci.yaml
Lines 190 to 202 in 1840b69
- name: test/project_erlang export erlang-shipment (non-windows) | |
run: | | |
gleam export erlang-shipment | |
./build/erlang-shipment/entrypoint.sh run | |
working-directory: ./test/project_erlang | |
if: ${{ runner.os != 'Windows' && matrix.run-integration-tests }} | |
- name: test/project_erlang export erlang-shipment (windows) | |
run: | | |
gleam export erlang-shipment | |
.\build\erlang-shipment\entrypoint.ps1 run | |
working-directory: ./test/project_erlang_windows | |
if: ${{ runner.os == 'Windows' && matrix.run-integration-tests }} |
compiler-cli/src/export.rs
Outdated
static ENTRYPOINT_TEMPLATE: &str = include_str!("../templates/erlang-shipment-entrypoint.sh"); | ||
static ENTRYPOINT_TEMPLATE_POWERSHELL: &str = | ||
include_str!("../templates/erlang-shipment-entrypoint.ps1"); | ||
static ENTRYPOINT_TEMPLATE_BOURNE_SHELL: &str = |
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.
It's not bourne shell, it's POSIX shell!
compiler-cli/src/export.rs
Outdated
ENTRYPOINT_FILENAME_BOURNE_SHELL, | ||
ENTRYPOINT_TEMPLATE_BOURNE_SHELL, | ||
), | ||
] { |
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.
Use functions for code reuse please, not loops
compiler-cli/src/export.rs
Outdated
{entrypoint} | ||
println!( | ||
" | ||
It can be copied to a compatible server with Erlang installed and run with one of the following scripts: |
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.
Wrap before 80 columns please.
compiler-cli/src/export.rs
Outdated
" | ||
It can be copied to a compatible server with Erlang installed and run with one of the following scripts: | ||
- {ENTRYPOINT_FILENAME_POWERSHELL} (PowerShell script) | ||
- {ENTRYPOINT_FILENAME_BOURNE_SHELL} (Bourne Shell script) |
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.
It's not bourne shell
compiler-cli/src/export.rs
Outdated
|
||
{entrypoint} | ||
println!( |
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.
Do not introduce an extra print statement please 🙏
"Bourne Shell" -> "POSIX Shell".
For the CI workflow, should I replace the two steps by one like that (I'm not familiar with github workflows)?:
|
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.
Thank you!!
#4360