-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
First pass at removing set-output
#235
Changes from 1 commit
d71060f
d0a2664
ed70145
b687a69
58f0a95
0835a07
b7f48f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/usr/bin/env -S expect -f | ||
|
||
set gitHubOutputFile composer_paths_01.txt | ||
set ::env(GITHUB_OUTPUT) $gitHubOutputFile | ||
|
||
set timeout 3 | ||
spawn ../../bin/composer_paths.sh | ||
match_max 100000 | ||
|
@@ -9,9 +12,24 @@ expect "::debug::Composer path is '*'\r | |
::debug::Composer cache directory found at '*'\r | ||
::debug::File composer.json found at './composer.json'\r | ||
::debug::File composer.lock path computed as './composer.lock'\r | ||
::set-output name=command::*\r | ||
::set-output name=cache-dir::*\r | ||
::set-output name=json::./composer.json\r | ||
::set-output name=lock::./composer.lock\r | ||
" | ||
expect eof | ||
|
||
set fp [open $gitHubOutputFile r] | ||
set fileData [read $fp] | ||
close $fp | ||
|
||
set expectedValue "command=*\r | ||
cache-dir=*\r | ||
json=./composer.json\r | ||
lock=./composer.lock\n | ||
" | ||
|
||
if { $expectedValue != $fileData } { | ||
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 test fails as it needs to do a regex compare, not a direct comparison. 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. My bash scripting is admittedly poor. Do you have an example I could use as a guide? 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. My bash scripting skills are even worse, then again, my Google skills are reasonable ;-)
|
||
puts "\nExpected output variable does not match. Received:\n" | ||
puts $fileData | ||
exit 1 | ||
} | ||
|
||
# Clean up | ||
file delete $gitHubOutputFile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/usr/bin/env -S expect -f | ||
|
||
set gitHubOutputFile composer_paths_05.txt | ||
set ::env(GITHUB_OUTPUT) $gitHubOutputFile | ||
|
||
set timeout 3 | ||
spawn ../../bin/composer_paths.sh "" "../fixtures/no-lock-file" | ||
match_max 100000 | ||
|
@@ -10,9 +13,24 @@ expect "::debug::Unable to find composer.lock at '../fixtures/no-lock-file/compo | |
::debug::Composer cache directory found at '*'\r | ||
::debug::File composer.json found at '../fixtures/no-lock-file/composer.json'\r | ||
::debug::File composer.lock path computed as ''\r | ||
::set-output name=command::*\r | ||
::set-output name=cache-dir::*\r | ||
::set-output name=json::../fixtures/no-lock-file/composer.json\r | ||
::set-output name=lock::\r | ||
" | ||
expect eof | ||
|
||
set fp [open $gitHubOutputFile r] | ||
set fileData [read $fp] | ||
close $fp | ||
|
||
set expectedValue "command=*\r | ||
cache-dir=*\r | ||
json=../fixtures/no-lock-file/composer.json\r | ||
lock=\r | ||
" | ||
|
||
if { $expectedValue != $fileData } { | ||
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 test fails as it needs to do a regex compare, not a direct comparison. |
||
puts "\nExpected output variable does not match. Received:\n" | ||
puts $fileData | ||
exit 1 | ||
} | ||
|
||
# Clean up | ||
file delete $gitHubOutputFile |
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.
Shellcheck doesn't like this output being called
command
...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've changed the variable name to
composer_command
.It doesn't seem like this will have any backwards compatibility concerns since it's only used within the repo. But not sure if I'm missing something.
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'd need to check, but this output may also be available to steps in external workflows being run after the step using this action runner.
If that's the case and while it would be rare for a workflow to use the
command
output, it would still need a changelog entry. Though as I said, this would need to be checked and confirmed first.