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
_______________________________________________
QBS mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs