fix if
This commit is contained in:
		@ -31,7 +31,7 @@ def get_version(build=0,version_format=None,dot=False):
 | 
			
		||||
            bump_output = p.stdout.read().decode('utf-8').rstrip()
 | 
			
		||||
            next_version = re.search("new_version=([0-9]*.[0-9]*.[0-9]*)", bump_output).group(1)
 | 
			
		||||
 | 
			
		||||
            if version_format is 'npm' or 'docker':
 | 
			
		||||
            if version_format in ('npm','docker'i):
 | 
			
		||||
                return "{}-{}.{}".format(next_version,branch.replace('/','-'),build)
 | 
			
		||||
            if version_format == 'maven':
 | 
			
		||||
                qualifier = 'SNAPSHOT' if build == 0 else build
 | 
			
		||||
 | 
			
		||||
@ -69,7 +69,7 @@ class TestGetVersion(unittest.TestCase):
 | 
			
		||||
    def test_branch_docker_pre_release(self):
 | 
			
		||||
        create_git_environment()
 | 
			
		||||
        subprocess.call(['git', 'checkout', '-b', 'patch/branch'])
 | 
			
		||||
        branch = get_version.get_version(build=2,version_format='npm')
 | 
			
		||||
        branch = get_version.get_version(build=2,version_format='docker')
 | 
			
		||||
        self.assertEqual(branch, "0.0.1-patch-branch.2")
 | 
			
		||||
    def test_branch_maven_pre_release(self):
 | 
			
		||||
        create_git_environment()
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user