a year ago
Hello, im building a kotlin gradle project and i am trying to access git repo information during build time.
Im doing so by using a gradle plugin "org.ajoberstar.grgit".
Example usage: grgit.head().abbreviatedId
While this works on my machine (and github actions) it doesnt here, telling me:
No .git directory found!
It seems like the build process isnt done in a git repository or something?
Id like some pointers/help with this 
Thanks!
5 Replies
a year ago
Hello,
We do not clone over the .git folder, this is not something we will be changing.
What information do you need to get, perhaps there is another way?
Best,
Brody
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
Thank you for the response, im glad to hear its coming. Do you know how soon yet? I may be able to just null the values until the feature is available.
Im using:
Current Git hash, branch, status (Dirty/Clean)
Im simply mirroring these values into the built jar for debugging purposes, but they are not integral to my service.
Status changed to Awaiting Railway Response Railway • about 1 year ago
a year ago
Hello,
Sorry for the misunderstanding, we will not pull the .git folder and we will not be changing that fact.
Perhaps these variables can help you -
https://docs.railway.com/reference/variables#git-variables
Best,
Brody
Status changed to Awaiting User Response Railway • about 1 year ago
a year ago
My bad, i misunderstood. That should suffice, thank you!
Status changed to Awaiting Railway Response Railway • about 1 year ago
Status changed to Awaiting User Response Railway • about 1 year ago
Status changed to Solved brody • about 1 year ago