-
-
Notifications
You must be signed in to change notification settings - Fork 276
hasAnyVersionTags and projectPath #317
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Thanks for your bug report. It's mostly clear what you're getting at. If That said I'm not quite sure about the provided additional details and using checkout twice in the same workflow is not supported by Github Actions as far as I know.
Generally speaking the action should be either part of your game repo (which you check out either way) or another repo that can be accessed like any other action, which doesn't require checkout. We do have an option called Hope this helps. |
I agree checking out an action is less than ideal, but sadly that's
github's official way of using private actions. In any case, that's the
specific problem I had with this bug, there may be others. Unless there's a
specific reason why that call to git was not in the projectFolder, I can
fix it in a second and create a PR for it.
…On Fri, Jan 14, 2022 at 1:04 AM Webber Takken ***@***.***> wrote:
Thanks for your bug report.
It's mostly clear what you're getting at. If hasAnyVersionTags doesn't
work in subfolders this should be fixed.
That said I'm not quite sure about the provided additional details and
using checkout twice in the same workflow is not supported by Github
Actions as far as I know.
Say you want to use custom actions in private git repositories - you then
need to checkout the action.
you're creating a "dirty" branch, which unity-builder will not build
Generally speaking the action should be either part of your game repo
(which you check out either way) or another repo that can be accessed like
any other action, which doesn't require checkout. We do have an option
called allowDirtyBuild which bypasses the check entirely, but it is not
recommended.
Hope this helps.
—
Reply to this email directly, view it on GitHub
<#317 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW3LGFOH3MGYOOAYXWO5RWDUV5K6PANCNFSM5L5DF5DQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Yup agreed. Also as mentioned above;
We're definitely open to your suggested changes. Thank you! |
Closed by #323 |
Bug description
The function hasAnyVersionTags in the Versioning class runs git through a call to System.run; unlike the more generic git function, which passes projectPath as the cwd parameter, hasAnyVersionTags does not - this breaks builds that check-out the repository to subfolders, since the git command will be run from a parent folder, which is not a git repository, and the call
will fail.
How to reproduce
Keeping all the defaults, the builder will make a call to hasAnyVersionTags and will fail due to the parent folder not being a repository
Expected behavior
Should behave exactly like the git function in Versioning, which passed projectPath as the cwd parameter to System.run.
Additional details
Why is this even important? Say you want to use custom actions in private git repositories - you then need to checkout the action. If you check it out into the game project's repository (i.e. under .github/actions) you're creating a "dirty" branch, which unity-builder will not build. So the best solution is to check the action out in a separate folder, which means checking out the project to a separate folder.
Solution is to add cwd to the call to System.run with projectPath.
The text was updated successfully, but these errors were encountered: