Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Set variable from file
-
I have several places in my plans where I set a variable value from a file. In OtterScript (since 5.0), it is shown as a legacy action. What recommendation do you have for bringing it up-to-date? Is there a different action I should use? Or do I need to write a custom function? I'm also curious as to why this isn't supported any more...
Sample:
Execute-LegacyAction
( Config: <Inedo.BuildMaster.Extensibility.Actions.Variables.SetVariableFromFileAction Assembly="BuildMasterExtensions"><Properties VariableName="RunScripts" FileName="ScriptsToRun.txt" MaxLength="14" OverriddenSourceDirectory="C:\BuildMasterAgent\buildscripts" /></Inedo.BuildMaster.Extensibility.Actions.Variables.SetVariableFromFileAction> );Product: BuildMaster
Version: 5.2.3 -
It's supported using the Legacy Action, which isn't ideal obviously.
This will be replaced with a function in v5/OtterScript:
# reads at most 250 characters from the file set $hdarfs = $FileContents(c:\hdarfs\info.txt, 250); Log-Information $hdarfs;However, this function is only available in 5.3 (which is shipping this week).
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login