File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1- from os import path
1+ from os import path , environ
22from conan import ConanFile
33from conan .errors import ConanInvalidConfiguration
44from conan .tools .build import check_min_cppstd
@@ -44,7 +44,12 @@ def _compilers_minimum_version(self):
4444 def export (self ):
4545 copy (self , "version.txt" , self .recipe_folder , self .export_folder )
4646 git = Git (self , self .recipe_folder )
47- scm_url , scm_commit = git .get_url_and_commit ()
47+ if environ .get ("CI" ) == "true" :
48+ scm_commit = environ .get ("GITHUB_SHA" )
49+ scm_url = f"{ environ .get ('GITHUB_SERVER_URL' )} /{ environ .get ('GITHUB_REPOSITORY' )} "
50+ else :
51+ scm_url , scm_commit = git .get_url_and_commit ()
52+
4853 update_conandata (self , {"sources" : {"commit" : scm_commit , "url" : scm_url }})
4954
5055 def set_version (self ):
You can’t perform that action at this time.
0 commit comments