Esempio n. 1
0
 def test_major_version(self):
     expect = VersionBump('version-2.0.0', major=True)
     annotator = Annotator(OPTIONS)
     commit_hashes = ['a', 'b', 'z']
     commit_msgs = [
         'a\n\nfix(stuff): I fixed some more stuff.',
         'b\n\nfeat(stuff): I added a sweet new feature.\n\nBREAKING CHANGE: This breaks stuff really bad.',
         'z\n\nfix(stuff): I fixed some stuff.'
     ]
     result = annotator.bump_semver(self.PREV_VERSION, commit_hashes,
                                    commit_msgs)
     self.assertEqual(expect, result)
Esempio n. 2
0
 def test_minor_version(self):
     expect = VersionBump('version-1.1.0', minor=True)
     annotator = Annotator(OPTIONS)
     commit_hashes = ['a', 'b', 'z']
     commit_msgs = [
         'a\n\nfix(stuff): I fixed some more stuff.',
         'b\n\nfeat(stuff): I added a sweet new feature.',
         'z\n\nfix(stuff): I fixed some stuff.'
     ]
     result = annotator.bump_semver(self.PREV_VERSION, commit_hashes,
                                    commit_msgs)
     self.assertEqual(expect, result)
Esempio n. 3
0
 def test_minor_reset_patch(self):
     expect = VersionBump('version-1.10.0', minor=True)
     annotator = Annotator(OPTIONS)
     commit_hashes = ['a', 'b', 'z']
     commit_msgs = [
         'a\n\nfix(stuff): I fixed some more stuff.',
         'b\n\nfeat(stuff): I added a sweet new feature.',
         'z\n\nfix(stuff): I fixed some stuff.'
     ]
     prev_version = CommitTag('z refs/tag/version-1.9.4')
     result = annotator.bump_semver(prev_version, commit_hashes,
                                    commit_msgs)
     self.assertEqual(expect, result)
 def test_patch_version(self):
   expect = VersionBump('version-1.0.1', patch=True)
   annotator = Annotator(OPTIONS)
   commit_hashes = [
     'a',
     'z'
   ]
   commit_msgs = [
     'a\n\nfix(stuff): I fixed some more stuff.',
     'z\n\nfix(stuff): I fixed some stuff.'
   ]
   result = annotator.bump_semver(self.PREV_VERSION, commit_hashes, commit_msgs)
   self.assertEqual(expect, result)
Esempio n. 5
0
 def test_major_reset_version(self):
     expect = VersionBump('version-2.0.0', major=True)
     annotator = Annotator(OPTIONS)
     commit_hashes = ['a', 'b', 'z']
     commit_msgs = [
         'a\n\nfix(stuff): I fixed some more stuff.',
         'b\n\nfeat(stuff): I added a sweet new feature.\n\nBREAKING CHANGE: This breaks stuff really bad.',
         'z\n\nfix(stuff): I fixed some stuff.'
     ]
     prev_version = CommitTag('z refs/tag/version-1.9.4-0')
     result = annotator.bump_semver(prev_version, commit_hashes,
                                    commit_msgs)
     self.assertEqual(expect, result)
 def test_patch_version(self):
   expect = VersionBump('version-1.0.1', patch=True)
   annotator = Annotator({})
   commit_hashes = [
     'a',
     'z'
   ]
   commit_msgs = [
     'a\n\nfix(stuff): I fixed some more stuff.',
     'z\n\nfix(stuff): I fixed some stuff.'
   ]
   result = annotator.bump_semver(self.PREV_VERSION, commit_hashes, commit_msgs)
   self.assertEqual(expect, result)
 def test_major_version(self):
   expect = VersionBump('version-2.0.0', major=True)
   annotator = Annotator(OPTIONS)
   commit_hashes = [
     'a',
     'b',
     'z'
   ]
   commit_msgs = [
     'a\n\nfix(stuff): I fixed some more stuff.',
     'b\n\nfeat(stuff): I added a sweet new feature.\n\nBREAKING CHANGE: This breaks stuff really bad.',
     'z\n\nfix(stuff): I fixed some stuff.'
   ]
   result = annotator.bump_semver(self.PREV_VERSION, commit_hashes, commit_msgs)
   self.assertEqual(expect, result)
 def test_minor_version(self):
   expect = VersionBump('version-1.1.0', minor=True)
   annotator = Annotator(OPTIONS)
   commit_hashes = [
     'a',
     'b',
     'z'
   ]
   commit_msgs = [
     'a\n\nfix(stuff): I fixed some more stuff.',
     'b\n\nfeat(stuff): I added a sweet new feature.',
     'z\n\nfix(stuff): I fixed some stuff.'
   ]
   result = annotator.bump_semver(self.PREV_VERSION, commit_hashes, commit_msgs)
   self.assertEqual(expect, result)
 def test_minor_reset_patch(self):
   expect = VersionBump('version-1.10.0', minor=True)
   annotator = Annotator(OPTIONS)
   commit_hashes = [
     'a',
     'b',
     'z'
   ]
   commit_msgs = [
     'a\n\nfix(stuff): I fixed some more stuff.',
     'b\n\nfeat(stuff): I added a sweet new feature.',
     'z\n\nfix(stuff): I fixed some stuff.'
   ]
   prev_version = CommitTag('z refs/tag/version-1.9.4')
   result = annotator.bump_semver(prev_version, commit_hashes, commit_msgs)
   self.assertEqual(expect, result)
Esempio n. 10
0
 def test_major_reset_version(self):
   expect = VersionBump('version-2.0.0', 'a', major=True)
   annotator = Annotator(OPTIONS)
   commit_hashes = [
     'a',
     'b',
     'z'
   ]
   commit_msgs = [
     'a\n\nfix(stuff): I fixed some more stuff.',
     'b\n\nfeat(stuff): I added a sweet new feature.\n\nBREAKING CHANGE: This breaks stuff really bad.',
     'z\n\nfix(stuff): I fixed some stuff.'
   ]
   prev_version = CommitTag('z refs/tag/version-1.9.4')
   result = annotator.bump_semver(prev_version, commit_hashes, commit_msgs)
   self.assertEqual(expect, result)