-
Notifications
You must be signed in to change notification settings - Fork 21
chore(ci): support independent versioning #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0c50e44
chore: replace next with releaseType
eunjae-lee 8d5e219
chore: parse new issue body correctly
eunjae-lee b817d9c
chore(ci): support independent versioning
eunjae-lee 2937162
chore: fix version bumping
eunjae-lee 7d3adbc
Merge branch 'main' into chore/versioning
eunjae-lee 6e0aebf
chore: fix test cases
eunjae-lee 5d1ef32
Merge branch 'main' into chore/versioning
eunjae-lee e778120
chore: add more test
eunjae-lee 99c6462
chore: move mainGenerator to clients.config.json
eunjae-lee eb51174
chore: clean up code
eunjae-lee acc7b40
chore: rename variables
eunjae-lee cc0707f
chore: extract types to types.ts
eunjae-lee 322a665
Merge branch 'main' into chore/versioning
eunjae-lee 08d1e69
Merge branch 'main' into chore/versioning
eunjae-lee 383a437
Update scripts/release/__tests__/process-release.test.ts
eunjae-lee 0975dfe
chore: update types
eunjae-lee bb942af
chore: update test
eunjae-lee 2b81135
Merge branch 'main' into chore/versioning
eunjae-lee d16ff92
chore: fix broken config
eunjae-lee 71bf7b6
Merge branch 'main' into chore/versioning
eunjae-lee 29e3bee
chore: avoid eslint error
eunjae-lee 69a1db1
chore: avoid eslint error
eunjae-lee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,67 @@ | ||
import { getVersionChangesText } from '../create-release-issue'; | ||
import { getVersionsToRelease, getLangsToUpdateRepo } from '../process-release'; | ||
import TEXT from '../text'; | ||
|
||
describe('process release', () => { | ||
it('gets versions to release', () => { | ||
const versions = getVersionsToRelease(` | ||
## Version Changes | ||
|
||
- [x] javascript: v1.0.0 -> v1.1.0 | ||
- [x] php: v2.0.0 -> v2.0.1 | ||
- [ ] java: v3.0.0 -> v3.0.1 | ||
- [x] javascript: v1.0.0 -> \`minor\` (e.g. v1.1.0) | ||
- [x] php: v2.0.0 -> \`patch\` (e.g. v2.0.1) | ||
- [ ] java: v3.0.0 -> \`patch\` (e.g. v3.0.1) | ||
`); | ||
|
||
expect(Object.keys(versions)).toEqual(['javascript', 'php']); | ||
expect(versions.javascript.current).toEqual('1.0.0'); | ||
expect(versions.javascript.next).toEqual('1.1.0'); | ||
expect(versions.javascript.releaseType).toEqual('minor'); | ||
expect(versions.php.current).toEqual('2.0.0'); | ||
expect(versions.php.next).toEqual('2.0.1'); | ||
expect(versions.php.releaseType).toEqual('patch'); | ||
}); | ||
|
||
it('gets langs to update', () => { | ||
expect( | ||
getLangsToUpdateRepo(` | ||
## Version Changes | ||
|
||
- [ ] javascript: v1.0.0 -> v1.1.0 | ||
- [x] php: v2.0.0 -> v2.0.1 | ||
- [ ] java: v3.0.0 -> v3.0.1 | ||
- [ ] javascript: v1.0.0 -> \`minor\` (e.g. v1.1.0) | ||
- [x] php: v2.0.0 -> \`patch\` (e.g. v2.0.1) | ||
- [ ] java: v3.0.0 -> \`patch\` (e.g. v3.0.1) | ||
`) | ||
).toEqual(['javascript', 'java']); | ||
}); | ||
|
||
it('parses issue body correctly', () => { | ||
// This test is a glue between create-release-issue and process-release. | ||
const issueBody = [ | ||
shortcuts marked this conversation as resolved.
Show resolved
Hide resolved
|
||
TEXT.versionChangeHeader, | ||
getVersionChangesText({ | ||
javascript: { | ||
current: '0.0.1', | ||
releaseType: 'patch', | ||
}, | ||
php: { | ||
current: '0.0.1', | ||
releaseType: 'minor', | ||
}, | ||
java: { | ||
current: '0.0.1', | ||
releaseType: 'patch', | ||
skipRelease: true, | ||
}, | ||
}), | ||
].join('\n'); | ||
|
||
const versions = getVersionsToRelease(issueBody); | ||
expect(versions).toEqual({ | ||
javascript: expect.objectContaining({ | ||
current: '0.0.1', | ||
releaseType: 'patch', | ||
}), | ||
php: expect.objectContaining({ | ||
current: '0.0.1', | ||
releaseType: 'minor', | ||
}), | ||
}); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.