You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I build conan center index recipes in-house, so that we get all our required build for our compilers. This works great, but one thing always occur.
The build script looks like
importosimportshutilfromcpt.packagerimportConanMultiPackagerfromconansimporttoolsdefcreate_clean_build_folder(folder):
ifos.path.exists(folder):
shutil.rmtree(folder)
os.makedirs(folder)
if__name__=="__main__":
url="https://github.com/conan-io/conan-center-index/archive/master.zip"recipe_folder="conan-center-index-master/recipes/zlib/1.2.8"build_folder="_build"reference="zlib/1.2.8@"tools.rmdir(build_folder)
os.makedirs(build_folder)
# download the conan index as zip and extract to a sub directorytools.get(
url,
filename="conan-index.zip",
destination=build_folder,
pattern=os.path.join(recipe_folder, "*"), # extract just zlib/1.2.8retry=2,
retry_wait=5
)
conanfile=os.path.join(build_folder, recipe_folder, "conanfile.py")
# normal cpt build, but with the downloaded conanfilebuilder=ConanMultiPackager(conanfile=conanfile, reference=reference)
builder.add_common_builds()
builder.run()
When we do this in the past we used channels to switch between channels. A half year ago we want to have the same reference as used in conan center index mypackage/0.1.2@ without channel and username and only upload on stable. This approach works but is not optimal for testing, because we need from time to time that the user can try out the new testing branch.
We think about using following approach in the near future:
We can do this in every build script and it would work but we have to do this over and over again. It would be nice when cpt would support that as well.
I've check the source code
and see that the actual impl. would not allow that because when it sees the @ in the reference it don't ask for the username/channel.
ifself.partial_reference:
if"@"inself.partial_reference:
self.reference=ConanFileReference.loads(self.partial_reference)
else:
name, version=self.partial_reference.split("/")
self.reference=ConanFileReference(name, version, self.username, self.channel)
else:
ifnotos.path.exists(os.path.join(self.cwd, self.conanfile)):
raiseException("Conanfile not found, specify a 'reference' ""parameter with name and version")
I think with a minimal modification this could be support.
What are you thinking about that?
Greetings
Michael
The text was updated successfully, but these errors were encountered:
variables:
CONAN_REFERENCE: "mypackage/0.1.0"CONAN_USERNAME: "company"CONAN_CHANNEL: "testing"CONAN_STABLE_BRANCH_PATTERN: "main"CONAN_STABLE_CHANNEL: ""# <= this seems not to work right now
Hey 👋 ,
I build conan center index recipes in-house, so that we get all our required build for our compilers. This works great, but one thing always occur.
The build script looks like
When we do this in the past we used channels to switch between channels. A half year ago we want to have the same reference as used in conan center index
mypackage/0.1.2@
without channel and username and only upload on stable. This approach works but is not optimal for testing, because we need from time to time that the user can try out the new testing branch.We think about using following approach in the near future:
stable branch:
mypackage/0.1.2@
testing branch:
mypackage/0.1.2@company/testing
We can do this in every build script and it would work but we have to do this over and over again. It would be nice when cpt would support that as well.
I've check the source code
and see that the actual impl. would not allow that because when it sees the
@
in the reference it don't ask for the username/channel.I think with a minimal modification this could be support.
What are you thinking about that?
Greetings
Michael
The text was updated successfully, but these errors were encountered: