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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
zip action did not return output path with zip if not given with one #9159
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 馃摑 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
|
||
absolute_output_path = File.expand_path(params[:output_path]) | ||
|
||
# Appends ".zip" if path does not end in ".zip" | ||
absolute_output_path = absolute_output_path.gsub(/(?<!.zip)$/, ".zip") |
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 love regex 鉂わ笍
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.
An awesome viewer helped me with that one 馃槆
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.
Why do we use a regex here, instead of absolute_output_path.end_with?(".zip")
or even File.extname(absolute_output_path)
? 馃憤
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.
@KrauseFx It was the cleanest/most fun single line approach 馃槆 yolo
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.
saw you fighting against that on stream (awesome btw) - LGTM 馃殌
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.
Nice work, just one comment 馃憤
|
||
absolute_output_path = File.expand_path(params[:output_path]) | ||
|
||
# Appends ".zip" if path does not end in ".zip" | ||
absolute_output_path = absolute_output_path.gsub(/(?<!.zip)$/, ".zip") |
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.
Why do we use a regex here, instead of absolute_output_path.end_with?(".zip")
or even File.extname(absolute_output_path)
? 馃憤
@joshdholtz can you submit a follow-up PR that removes the regex? It's a lot harder to read for developers 馃憤 |
Hey @joshdholtz 馃憢 Thank you for your contribution to fastlane and congrats on getting this pull request merged 馃帀 Please let us know if this change requires an immediate release by adding a comment here 馃憤 |
Congratulations! 馃帀 This was released as part of fastlane 2.31.0 馃殌 |
zip
action now will always return an output path with the.zip
extension 馃槉