Skip to content

Commit

Permalink
Always add barbarian remote to any conan commands.
Browse files Browse the repository at this point in the history
If we have recipes that depend on Barbarian stored recipes they will
fail to resolve during export. As we only have the default conan-center
remote added to the local config tree. This unconditionally adds the
barbarian remote to all conan command we run, and not just the upload.
  • Loading branch information
grafikrobot committed Jan 7, 2022
1 parent a9194fe commit 2cb714e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions HISTORY.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
= History

== 0.2.2

* Fix errors when trying to refer to recipe dependencies in the Barbarian
service during export and upload of Barbarian recipes.

== 0.2.1

* Fix errors if the barbarian branch exist on origin only.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from setuptools import setup, find_namespace_packages
import os

VERSION = '0.2.1'
VERSION = '0.2.2'

print("TEST_VERSION:", os.getenv('TEST_VERSION'))
if os.getenv('GHA_TEST_VERSION'):
Expand Down
9 changes: 5 additions & 4 deletions src/barbarians/barbarian.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ def conan_api(self):
if name.endswith('.py'):
copy(os.path.join(hooks_dir_src, name),
os.path.join(hooks_dir_dst, name))
# Add the Barbarian remote so we can find dependencies.
self.conan_api.remote_add(
"barbarian-github",
"https://barbarian.bfgroup.xyz/github",
force=True)
return self._conan_api

def have_branch(self, branch):
Expand Down Expand Up @@ -499,10 +504,6 @@ def command_upload(self, args):
recipe_ref = "%s/%s@%s/%s#%s" % (
*self.recipe_name_and_version, *self.recipe_user_and_channel, self.recipe_exported_revision)
print("[INFO] Register recipe", recipe_ref, flush=True)
self.conan_api.remote_add(
"barbarian-github",
"https://barbarian.bfgroup.xyz/github",
force=True)
conan_export_tgz = self.conan_api.get_path(
recipe_ref,
path="conan_export.tgz",
Expand Down

0 comments on commit 2cb714e

Please sign in to comment.