diff options
| -rw-r--r-- | include/deliverable.h | 1 | ||||
| -rw-r--r-- | src/deliverable.c | 15 | 
2 files changed, 16 insertions, 0 deletions
| diff --git a/include/deliverable.h b/include/deliverable.h index 08b3565..941f6ba 100644 --- a/include/deliverable.h +++ b/include/deliverable.h @@ -117,6 +117,7 @@ void delivery_tests_show(struct Delivery *ctx);  int delivery_build_recipes(struct Delivery *ctx);  struct StrList *delivery_build_wheels(struct Delivery *ctx);  int delivery_index_wheel_artifacts(struct Delivery *ctx); +char *delivery_get_spec_header(struct Delivery *ctx);  void delivery_rewrite_spec(struct Delivery *ctx, char *filename);  int delivery_copy_wheel_artifacts(struct Delivery *ctx);  int delivery_copy_conda_artifacts(struct Delivery *ctx); 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; | 
