Closed chemicalcrux closed 1 year ago
In an upcoming release of the Build Actions package, ScriptRunner
will gain the ability to use $BUILD
and $VERSION
in input and output paths for single run actions thanks to a rewrite of the string tokens system, so this should get you halfway to your use case.
Build-time related tokens are currently not enabled for single run actions, as they are currently generated from a per-build DateTime
, so whilst $YEAR
, $MONTH
and $DAY
would be the same for a single run action as for a series of builds that the action ran before or after, $TIME
would be only correspond to the time the single run action was performed. That being said, I think it would probably be fine to enable the usage of these tokens so long as the limitation around $TIME
was documented.
The $BUILD
and $VERSION
tokens I mentioned before can now be used by ScriptRunner
with the v4.0.0 release of this package 🎉
I have a script that uploads my Windows, macOS, and Linux builds to Steam.
Since this script only runs once, it doesn't make sense to use the "Per Platform" action type.
However, if I use the "Single Run" action type, then I cannot access things like the build version --
BuildProject.ResolvePath
only gets run for per-platform actions. So, I can't pass a path to the build directory to my script.I can get around this for now by just using the most recently created build folder, but it'd be nice if I could access constants that aren't platform-specific (e.g. version, build day, etc.) through a single-run action!