diff options
Diffstat (limited to 'src/deliverable.c')
-rw-r--r-- | src/deliverable.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/deliverable.c b/src/deliverable.c index e7a2015..b534264 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -576,6 +576,21 @@ int delivery_index_wheel_artifacts(struct Delivery *ctx) { } return 0; } +char *delivery_get_spec_header(struct Delivery *ctx) { + char output[BUFSIZ]; + char stamp[100]; + const char *header = "# delivery_name: %s\n" + "# creation_time: %s\n" + "# conda_version: %s\n" + "# condabuild_version: %s\n"; + strftime(stamp, sizeof(stamp) - 1, "%c", ctx->info.time_info); + sprintf(output, header, + ctx->info.release_name, + stamp, + ctx->conda.tool_version, + ctx->conda.tool_build_version); + return strdup(output); +} void delivery_rewrite_spec(struct Delivery *ctx, char *filename) { char *package_name = NULL; |