Skip to content
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

ci(shipjs): also push tags of non-published packages #5230

Merged
merged 3 commits into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ build/
# Unneeded changelogs
examples/*/*/CHANGELOG.md
tests/*/CHANGELOG.md
scripts/*/CHANGELOG.md

# Logs
*.log
Expand Down
1 change: 1 addition & 0 deletions scripts/website/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-react-instantsearch-builder",
"private": true,
"version": "1.0.0",
"license": "MIT",
"scripts": {
Expand Down
11 changes: 4 additions & 7 deletions ship.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
const shell = require('shelljs');

const packages = JSON.parse(
shell.exec('yarn run --silent lerna list --toposort --json --no-private', {
shell.exec('yarn run --silent lerna list --toposort --json', {
silent: true,
})
);

module.exports = {
shouldPrepare: ({ releaseType, commitNumbersPerType }) => {
const { fix = 0 } = commitNumbersPerType;
if (releaseType === 'patch' && fix === 0) {
return false;
}
shouldPrepare: () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why always return true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the package returned from version possibly doesn't have any relevant pushes, while other packages would have stuff to release. Therefore I think it's best if we get the pr every two weeks and choose to close if it's irrelevant

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to document this process so we're all fully aware of it and can manage it. For now it's blurry to me how things would go and what are the different possible scenarios.

Also, we need to better handle this for when we have feature teams contribute, we can't be the only ones on duty of merging release PRs in the long run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is what's described in algolia/shipjs#986 sufficient? For now if a release is prepared, but none of the packages requires that update, shipjs will still prepare the release, possibly doing a useless release (not that big of a deal) that we can manually cancel if we don't think it's needed to release just yet, similarly as already happens from time to time today when the only changes are minor things that don't need to be released

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I created a Jira ticket so we handle this quickly, I'm not fond of such a manual process to last too long.

return true;
},
getTagName: () =>
Expand All @@ -23,7 +19,8 @@ module.exports = {
);

return {
// This is used for shouldPrepare
// This version number is used for shouldPrepare.
// for it to be useful, we need to chang shipjs to accept an array of nextVersions
Haroenv marked this conversation as resolved.
Show resolved Hide resolved
nextVersion: packages[0].version,
};
},
Expand Down