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

Add monorepo_add to allow incremental build #345

Merged
merged 4 commits into from Jul 31, 2018

Conversation

lukaso
Copy link

@lukaso 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

@lukaso
Copy link
Author

lukaso commented Jul 25, 2018

Based on discussion in #322.

Copy link
Contributor

@PetrHeinz PetrHeinz left a 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
Copy link
Contributor

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
Copy link
Contributor

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).

Copy link
Contributor

@MattCzerner MattCzerner left a 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]
Copy link
Contributor

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

@@ -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.
Copy link
Contributor

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
Copy link
Contributor

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

@PetrHeinz PetrHeinz merged commit c87ab6d into shopsys:master Jul 31, 2018
@PetrHeinz
Copy link
Contributor

@lukaso Thanks a lot! It's merged now. 👍

@lukaso
Copy link
Author

lukaso commented Aug 1, 2018

| @lukaso Thanks a lot! It's merged now.

Great!

@lukaso lukaso deleted the monorepo_add branch August 1, 2018 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants