Skip to content

Commit f5802fb

Browse files
authored
Merge pull request #8 from uilianries/hotfix/conan-upload
Fix Conan upload
2 parents cd49694 + 8f6c17f commit f5802fb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.conan/build.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ def upload(self):
2121
return os.getenv("CONAN_UPLOAD", bintray_url)
2222

2323
@property
24-
def upload_only_when_stable(self):
25-
""" Force to upload when running over tag branch
24+
def channel(self):
25+
""" Default conan channel
2626
"""
27-
return os.getenv("CONAN_UPLOAD_ONLY_WHEN_STABLE", True)
27+
return os.getenv("CONAN_CHANNEL", "stable")
2828

2929
@property
30-
def stable_branch_pattern(self):
31-
""" Only upload the package the branch name is like a tag
30+
def upload_only_when_tag(self):
31+
""" Only upload the package the branch is a tag
3232
"""
33-
return os.getenv("CONAN_STABLE_BRANCH_PATTERN", r"\d+\.\d+\.\d+")
33+
return os.getenv("CONAN_UPLOAD_ONLY_WHEN_TAG", True)
3434

3535
@property
3636
def reference(self):
@@ -45,16 +45,16 @@ def reference(self):
4545
version = result.group(1)
4646
if not version:
4747
raise Exception("Could not find version in CMakeLists.txt")
48-
return os.getenv("CONAN_REFERENCE", "sequences/{}@taocpp/stable".format(version))
48+
return os.getenv("CONAN_REFERENCE", "sequences/{}@{}/{}".format(version, self.username, self.channel))
4949

5050
if __name__ == "__main__":
5151
settings = BuilderSettings()
5252
builder = ConanMultiPackager(
5353
reference=settings.reference,
5454
username=settings.username,
5555
upload=settings.upload,
56-
upload_only_when_stable=settings.upload_only_when_stable,
57-
stable_branch_pattern=settings.stable_branch_pattern,
56+
channel=settings.channel,
57+
upload_only_when_tag=settings.upload_only_when_tag,
5858
test_folder=os.path.join(".conan", "test_package"))
5959
builder.add()
6060
builder.run()

0 commit comments

Comments
 (0)