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
Add monorepo_add
to allow incremental build
#345
Conversation
lukaso
commented
Jul 25, 2018
Q | A |
---|---|
Description, reason for the PR | Create the ability to incrementally add a repo to an existing monorepo. |
New feature | Yes |
BC breaks | No |
Fixes issues | ... |
Standards and tests pass | I have tested, but there are no standard tests for these tools. |
Have you read and signed our License Agreement for contributions? | Yes |
Based on discussion in #322. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lukaso, I think this is great, I have just two minor notes on the documentation.
@MattCzerner: please, can you review it for the final approvement?
|
||
# Add to a monorepo from specified remotes | ||
# You must first add the remotes by "git remote add <remote-name> <repository-url>" and fetch from them by "git fetch --all" | ||
# Final monorepo will contain all branches from the first remote and master branches of all remotes will be merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, I would change it to:
It will merge master branches of the monorepo and all remotes together while keeping all current branches in monorepo intact
# | ||
# Usage: monorepo_add.sh <remote-name>[:<subdirectory>] <remote-name>[:<subdirectory>] ... | ||
# | ||
# Example: monorepo_add.sh additional-repository package-alpha:packages/alpha package-beta:packages/beta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe monorepo_add.sh package-gamma:packages/gamma
would be clearer and more consistent example of the usage (as you shouldn't provide already merged repositories).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed your contribution and is fine by me. Great job 👍 .
We tested it and it works just fine.
I just found last few details in CHANGELOD.md
and comments in script. After you change these details, we will merge it to master.
Thank you for your contribution. :)
CHANGELOG.md
Outdated
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. | |||
## [Unreleased] | |||
### [shopsys/framework] | |||
#### Added | |||
- [#345 - monorepo-tools: allow incremental build of monorepo](https://github.com/shopsys/shopsys/pull/345) [@lukaso] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lukaso , changes written here are fine, just please move the record from shopsys/framework
to shopys/monorepo-tools
packages/monorepo-tools/README.md
Outdated
@@ -108,6 +108,12 @@ Split monorepo built by `monorepo_build.sh` and push all `master` branches along | |||
|
|||
Usage: `monorepo_split.sh <remote-name>[:<subdirectory>] <remote-name>[:<subdirectory>] ...` | |||
|
|||
### [monorepo_add.sh](./monorepo_add.sh) | |||
|
|||
Add to an existing monorepo from specified remotes. The remotes must be already added to your repository and fetched. Only master branch will be added from each repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead 'Add to an existing monorepo' please change to something like 'Add repositories to an existing monorepo
@@ -0,0 +1,51 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# Add to a monorepo from specified remotes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead 'Add to an existing monorepo' please change to something like 'Add repositories to an existing monorepo
@lukaso Thanks a lot! It's merged now. 👍 |
| @lukaso Thanks a lot! It's merged now. Great! |