From 6160002676a19aa147f6f9888b84dd5d7255330a Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Fri, 11 Jun 2021 09:02:39 -0400 Subject: [PATCH] Replace `{type_id}` for releases with `{release_tag}` --- README.rst | 17 +++++++++-------- src/tinuous/github.py | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index f3e843d..b11704c 100644 --- a/README.rst +++ b/README.rst @@ -269,20 +269,21 @@ A sample config file: repo: datalad/datalad vars: - path_prefix: '{year}//{month}//{day}/{ci}/{type}/{type_id}/{build_commit[:7]}' + path_prefix: '{year}//{month}//{day}/{ci}/{type}' + build_prefix: '{path_prefix}/{type_id}/{build_commit[:7]}' ci: github: - path: '{path_prefix}/{wf_name}/{number}/logs/' - artifacts_path: '{path_prefix}/{wf_name}/{number}/artifacts/' - releases_path: '{path_prefix}/' + path: '{build_prefix}/{wf_name}/{number}/logs/' + artifacts_path: '{build_prefix}/{wf_name}/{number}/artifacts/' + releases_path: '{path_prefix}/{type}/{release_tag}/' workflows: - test_crippled.yml - test_extensions.yml - test_macos.yml travis: - path: '{path_prefix}/{number}/{job}.txt' + path: '{build_prefix}/{number}/{job}.txt' appveyor: - path: '{path_prefix}/{number}/{job}.txt' + path: '{build_prefix}/{number}/{job}.txt' accountName: mih projectSlug: datalad since: 2021-01-20T00:00:00Z @@ -331,8 +332,8 @@ Placeholder Definition ``pr``, this is the number of the associated pull request, or ``UNK`` if it cannot be determined; for ``push``, this is the name of the branch to which the push was made (or - possibly the tag that was pushed, if using Appveyor); for - ``release``, this is the name of the tag + possibly the tag that was pushed, if using Appveyor) [1]_ +``{release_tag}`` *(``releases_path`` only)* The release tag ``{build_commit}`` The hash of the commit the build ran against or that was tagged for the release. Note that, for PR builds on Travis and Appveyor, this is the hash of an autogenerated diff --git a/src/tinuous/github.py b/src/tinuous/github.py index 256ced0..d5c373d 100644 --- a/src/tinuous/github.py +++ b/src/tinuous/github.py @@ -368,7 +368,7 @@ def path_fields(self) -> Dict[str, str]: "second": utc_date.strftime("%S"), "ci": "github", "type": "release", - "type_id": self.tag_name, + "release_tag": self.tag_name, "build_commit": self.commit, "commit": self.commit, }