Skip to content

Commit

Permalink
Merge pull request #36 from sendbird/feature/hoon/android/uikit-compose
Browse files Browse the repository at this point in the history
Allowed -beta versioning
  • Loading branch information
bang9 authored Jul 23, 2024
2 parents 91e6af2 + 1d73710 commit 7a138a4
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 109 deletions.
15 changes: 14 additions & 1 deletion __tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('extractVersion', () => {
expect(extractVersion('release/ktx/test/v1.2.3')).toBe('1.2.3')
})

test('Should return an empty string if the branch convention is invalid', () => {
test('should return an empty string if the branch convention is invalid', () => {
expect(extractVersion('v1.2.3')).toBe('')
expect(extractVersion('1.2.3')).toBe('')
expect(extractVersion('unknown/1.2.3')).toBe('')
Expand All @@ -25,4 +25,17 @@ describe('extractVersion', () => {
expect(extractVersion('releases/1.2.3')).toBe('')
expect(extractVersion('releases/v1.2.3')).toBe('')
})

test('should return the version with the tag', () => {
expect(extractVersion('hotfix/swift/v1.2.3-beta')).toBe('1.2.3-beta')

expect(extractVersion('release/ktx/1.2.3-beta.0')).toBe('1.2.3-beta.0')
expect(extractVersion('hotfix/ktx/1.2.3-beta.0')).toBe('1.2.3-beta.0')

expect(extractVersion('release/compose/1.2.3-beta.0')).toBe('1.2.3-beta.0')
expect(extractVersion('hotfix/compose/1.2.3-beta.0')).toBe('1.2.3-beta.0')

expect(extractVersion('release/swift/v1.2.3-rc.0')).toBe('1.2.3-rc.0')
expect(extractVersion('hotfix/swift/v1.2.3-rc.0')).toBe('1.2.3-rc.0')
})
})
Loading

0 comments on commit 7a138a4

Please sign in to comment.