[QBS] Do you accept patches of code?
Alexey Obukhov
obukhov at cyberplat.com
Wed Aug 7 14:26:43 CEST 2013
Hello,
> Could you sketch your use case?
I need to create a file in Transformer (Version.h) which would be specified when building the project.
For example:
Transformer {
inputs: "includes/Common/Version.h.in"
Artifact {
fileName: "includes/Common/Version.h"
fileTags: "processed_file"
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "Processing '" + input.fileName + "'";
cmd.highlight = "codegen";
cmd.sourceCode = function() {
var file = new TextFile(input.fileName);
var content = file.readAll();
content = content.replace("PRODUCT_VERSION", "3.0.1.Qt5").replace("BUILD_TIME", DateTime.currentDateTime().toString("yyyyMMddhhmmss"));
file = new TextFile(output.fileName, TextFile.WriteOnly);
file.truncate();
file.write(content);
file.close();
}
return cmd;
}
}
And second:
It would be very nice to be able to use environment variables in these scripts. How can this be done?
It would also be great to be able to change the parameters or the contents of an assembly according to the environment variables.
All this is necessary for the integration of the qbs build in the TeamCity continuous integration server.
Best regards,
Alexey Obukhov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20130807/099ed48d/attachment.html>
More information about the Qbs
mailing list