in src/lambda.d/nexuspreconfigure/nexus.py [0:0]
def _createScript(self, client, scriptName):
if client.scripts.exists(scriptName):
logger.warn(f"| Nexus: deleting existing script {scriptName} for recreating a new one")
client.scripts.delete(scriptName)
with open(f"{pathlib.Path(__file__).parent.absolute()}/{scriptName}.groovy") as f:
scriptContent = f.read()
logger.info(f"| Nexus: creating script {scriptName}")
client.scripts.create(scriptName, scriptContent)