-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[snapshot] added check for missing Snapshot Helper File (#13038) #13205
[snapshot] added check for missing Snapshot Helper File (#13038) #13205
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Awesome! What is missing right now is some instruction on how to do create the file. The best source I could find was https://docs.fastlane.tools/actions/snapshot/#quick-start. Maybe add that (or something better I missed) to the error message? |
You're right that's more user friendly. Hope the wording is ok |
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 like it! 🥇
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.
Two small nitpicks just to keep some UI
formatting consistent in this file 😊
snapshot/lib/snapshot/runner.rb
Outdated
@@ -122,6 +122,15 @@ def verify_helper_is_current | |||
UI.verbose("Checking that helper files contain #{current_version}") | |||
|
|||
helper_files = Update.find_helper | |||
if helper_files.empty? | |||
UI.error("Your Snapshot Helper file is missing, please place a copy") | |||
UI.error("in your project directory.") |
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.
Can we remove the "." on this line?
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.
Done
snapshot/lib/snapshot/runner.rb
Outdated
UI.error("in your project directory.") | ||
UI.message("More information about Snapshot setup can be found here:") | ||
UI.message("https://docs.fastlane.tools/actions/snapshot/#quick-start") | ||
UI.user_error!("Please add a Snapshot Helper file to your project.") |
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.
Can we also remove the "." on this line?
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.
Done
Right 😁 Fixed it now |
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.
Thanks for making those changes and thanks for the contribution! 💪 ❤️
…) (fastlane#13205) * [snapshot] added check for missing Snapshot Helper File (fastlane#13038) * [snapshot] added link to snapshot quick setup in error message (fastlane#13038) * [snapshot] UI formatting (fastlane#13038)
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
Fixes #13038
Description
Added check for missing Snapshot Helper File. If there is no Snapshot Helper File found, snapshots exits with a descriptive user error.
I tested the fix via manually deleting the Snapshot Helper File from my project and running
fastlane snapshot
afterwards.