Passing multiple commands to Command Line Build RTC 4.0.4 with Linux JBE
I have a command line build that works fine with a script, but I would like to possibly preprocess using a Linux command. So, for this example I want to invoke sed on the script, for instance:
/bin/sed 's/\r//g' buildscript.sh | /bin/sh or to accomplish the same thing: dos2unix buildscript.sh; ./buildscript.sh While this is just a simple case of converting the Windows line endings to Unix/Linux line endings there might be other things we may want to do on the build definition command line. We do not use eclipse projects on our project, but our developers use either Linux or Windows for the RTC client. |
One answer
The problem is that windows users can cause the script to have Windows line engings (eg. CRLF). The CR will prevent BASH from executing the script.
The issue is the command line build. We use a script to do a maven build and perform some post-build tasks. The best solution I could think of is to use sed to eliminate the CRs and pipe it into bash (or sh). But the command-line build definition command line just ends up passing the pipe (or semicolon in the second example) to the first command. There are other solutions, such as using the project explorer, but that does not ensure that the script will always have Linux line endings. This is a minor issue since the developers who use Windows can also use some discipline. Comments
Lily Wang
commented May 20 '14, 3:33 a.m.
I did the test in my RTC 4.0.6. I don't think the JBE Command Line build can accept multiple commands.
Jerry Feldman
commented May 20 '14, 7:50 a.m.
Thanks Lily,
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
You can definitely use scripts on Linux. But what is your exact question?