ml-archive / bitrise-step-nodes-custom-script

Custom Bitrise step for the iOS CI system
MIT License
2 stars 6 forks source link

adds disableHockeyVersionCheck feature #15

Closed pbodsk closed 5 years ago

pbodsk commented 5 years ago

which allows you to bypass Hockey version validation

pbodsk commented 5 years ago

@nickskull, @chriscombs, @jakobmygind

I've tried implementing the feature we talked about on slack today so you can bypass the hockey validation.

Granted, the check is a bit crude...just another unless outside the existing one but it seems to work. If you have better suggestions I'm more than willing to listen 😄

dominik-hadl commented 5 years ago

I think the actual hockey check shouldn’t be performed at all?

pbodsk commented 5 years ago

@nickskull you mean completely remove it so it is never executed?

dominik-hadl commented 5 years ago

@pbodsk yeah, I mean, what’s the point of doing the check if you ignore the result in the end?

pbodsk commented 5 years ago

We don't ignore it always.

If disable_hockey_version_check is set to true, then we ignore it.

But if disable_hockey_version_check is not set (the default), then we still do the check and fail if pre-conditions are invalid.

unless disable_hockey_version_check
       unless (Version.new(xcode_version) >= Version.new(hockey_version)) && (xcode_build > hockey_build)
         valid = false
         warning_message = """#{key}: Xcode version #{xcode_version} (#{xcode_build}) is lower or equal than the one on Hockey #{hockey_version} (#{hockey_build})."""
         message +="#{warning_message} \n"
         puts yellow "|- #{warning_message}"
       end
     end
dominik-hadl commented 5 years ago

Of course :D I meant only when disabling the check