Skip to content
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

"Single-run" post-build action does not match filter to all build configurations #63

Open
nickfourtimes opened this issue Nov 23, 2020 · 3 comments

Comments

@nickfourtimes
Copy link
Contributor

I'm trying to build both Mac and Windows versions of our game, and then upload both to Steam. I've set up a single-run ScriptRunner action to fire after all builds are completed. The filter for the ScriptRunner is set to Distribution == Steam and Release Type == Release.

However, just as a test, I ran a build with the following configurations enabled:

  • Release/Windows/Steam
  • Release/OSX/Steam
  • Release/OSX/Standalone

Despite the latter configuration not matching the filter, the ScriptRunner still fires after all three builds are complete.

In my particular case, I think I can get by with a ScriptRunner per-platform, using separate scripts to upload the Mac & Windows builds to Steam individually. However, the behaviour posted above does seem like a bug – is there no way to make sure a single-run filter matches all build configurations?

@robinnorth
Copy link
Collaborator

@nickfourtimes do you have your filter configuration set to match 'Any' or 'All' conditions? 'Any' is the default, and that would explain the behaviour you're seeing.

image

@nickfourtimes
Copy link
Contributor Author

I had a moment's panic that I'd overlooked something so simple, but indeed the condition is set to "All." I ran the following test setup, and the script still ran once all three individual configurations were built.

Screen Shot 2020-11-24 at 9 24 32 AM
Screen Shot 2020-11-24 at 9 24 45 AM

@robinnorth
Copy link
Collaborator

Finally had some time to look into this further @nickfourtimes, and it seems that 'Single Run' BuildActions are always run once per build and ignore any filters that are configured for them -- these are only used when considering whether or not to run 'Per Platform' actions.

At the very least the UI should make this clear by hiding the filter UI when an action's type is set to 'Single Run', and that's easy enough to do. Adding support for filtering single run actions would involve a bit more work, as each enabled build would need to be evaluated against the filters, the results of which would then need to be combined, potentially with the ability to specify whether 'Any' or 'All' builds need to pass filtering before the action will be performed.

I will ensure that the former gets into the upcoming 1.0.0 release, the latter may have to be more of a longer term enhancement. For now, as you noted in your original comment, the best way to achieve what you're trying to do (build for Steam and upload to Steam) is to run that script per-platform, or for your script to evaluate which builds to upload to Steam separately (e.g. you could use the $DISTRIBUTION replacement token in your build path to build Steam builds to a 'Steam' directory and then check for that in the file path used by your uploader script).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants