File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
2- from conans import ConanFile ,tools ,CMake
3-
4- def get_version ():
5- git = tools .Git ()
6- try :
7- prev_tag = git .run ("describe --tags --abbrev=0" )
8- commits_behind = int (git .run ("rev-list --count %s..HEAD" % (prev_tag )))
9- # Commented out checksum due to a potential bug when downloading from bintray
10- #checksum = git.run("rev-parse --short HEAD")
11- if prev_tag .startswith ("v" ):
12- prev_tag = prev_tag [1 :]
13- if commits_behind > 0 :
14- prev_tag_split = prev_tag .split ("." )
15- prev_tag_split [- 1 ] = str (int (prev_tag_split [- 1 ]) + 1 )
16- output = "%s-%d" % ("." .join (prev_tag_split ), commits_behind )
17- else :
18- output = "%s" % (prev_tag )
19- return output
20- except :
21- return '0.0.0'
22-
2+ from conans import ConanFile , python_requires , CMake
3+ conan_tools = python_requires ("conan-tools/[>=1.0.0]@includeos/stable" )
234
245class DiskbuilderConan (ConanFile ):
256 settings = "os_build" ,"arch_build"
267 name = "diskbuilder"
27- version = get_version ()
8+ version = conan_tools . git_get_semver ()
289 license = "Apache-2.0"
2910 description = "A tool to create an IncludeOS binary filesystem image"
3011 scm = {
@@ -36,7 +17,7 @@ class DiskbuilderConan(ConanFile):
3617 generators = 'cmake'
3718 no_copy_source = True
3819 default_user = "includeos"
39- default_channel = "test "
20+ default_channel = "latest "
4021
4122 def _cmake_configure (self ):
4223 cmake = CMake (self )
You can’t perform that action at this time.
0 commit comments