#Extending with Shared Libraries
1 messages · Page 1 of 1 (latest)
maybe this? https://stackoverflow.com/questions/1163093/how-do-you-get-the-path-of-the-running-script-in-groovy
new File(getClass().protectionDomain.codeSource.location.path)
OK yeah that works to get the directory of the current script. Should be pretty easy to get the resources directory from there and then run a dagger command.
nice! I should try that too. I haven't played with Shared Libraries before.
OK so apparently it can't be run outside of a project, and I'm not sure if there is a way to tell it where the project is. I was hoping that I could run the dagger command from within the context of the workspace in jira, but keep the project and files in another location but I'm not sure that's possible.
https://github.com/dagger/dagger/issues/2165 This issue might be relevant.
But could fetch project into workspace.
Then load subdir as source