Handy mr commands for updating all apb repos

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Handy mr commands for updating all apb repos

David Martin
For future handiness,

If you've already run 'mr register' in each of the cloned apb repos (e.g https://github.com/feedhenry/unifiedpush-apb), here's some commands to update the same file in each repo, and create a PR.
In this case, it was updating the apb tools image name.


# Checkout master, update it, then checkout a new branch
mr run git checkout master
mr run git pull origin master
mr run git checkout -b update-apb-tools-image

# Replace the image name in the Makefile
mr run sed -i 's/ansibleplaybookbundle\/apb/ansibleplaybookbundle\/apb-tools/' Makefile

# Add, Commit and push
mr run git add Makefile
mr run git commit -m "Update the apb image to use apb-tools"
mr run git push origin update-apb-tools-image

# Create the pull requests
mr run hub pull-request -b feedhenry:master -m "Update the apb image to use apb-tools"
.....




--
David Martin
Red Hat Mobile
Twitter: @irldavem
IRC: @irldavem (feedhenry, mobile-internal)

_______________________________________________
feedhenry-dev mailing list
[hidden email]
https://www.redhat.com/mailman/listinfo/feedhenry-dev
Reply | Threaded
Open this post in threaded view
|

Re: Handy mr commands for updating all apb repos

Paolo Haji de Carvalho Bueno
This is great info!
It's very similar to the part of the rationale for using lerna in RainCatcher, though the main points are the versioning of published npm packages and the symlinking for local development.

I was wondering if there is a way to filter repositories form `mr run`, considering for example you could have registered other, non-apb repos under mr.
It seems this is possible through a skip param that receives a bash command and passes the repository's name via $1.

Looking at more of the documentation of both myrepos and repo it seems they support the notion of sharing the configuration file, so it might be worth looking into having i.e. a small repository/gist with an .mrconfig for the set of apb repos

On Thu, Dec 7, 2017 at 8:10 AM, David Martin <[hidden email]> wrote:
For future handiness,

If you've already run 'mr register' in each of the cloned apb repos (e.g https://github.com/feedhenry/unifiedpush-apb), here's some commands to update the same file in each repo, and create a PR.
In this case, it was updating the apb tools image name.


# Checkout master, update it, then checkout a new branch
mr run git checkout master
mr run git pull origin master
mr run git checkout -b update-apb-tools-image

# Replace the image name in the Makefile
mr run sed -i 's/ansibleplaybookbundle\/apb/ansibleplaybookbundle\/apb-tools/' Makefile

# Add, Commit and push
mr run git add Makefile
mr run git commit -m "Update the apb image to use apb-tools"
mr run git push origin update-apb-tools-image

# Create the pull requests
mr run hub pull-request -b feedhenry:master -m "Update the apb image to use apb-tools"
.....




--
David Martin
Red Hat Mobile
Twitter: @irldavem
IRC: @irldavem (feedhenry, mobile-internal)

_______________________________________________
feedhenry-dev mailing list
[hidden email]
https://www.redhat.com/mailman/listinfo/feedhenry-dev




--

PAOLO HAJI

SOFTWARE ENGINEER, RED HAT MOBILE APPLICATION PLATFORM

Red Hat Brasil

[hidden email]   


_______________________________________________
feedhenry-dev mailing list
[hidden email]
https://www.redhat.com/mailman/listinfo/feedhenry-dev
Reply | Threaded
Open this post in threaded view
|

Re: Handy mr commands for updating all apb repos

David Martin
Another option for different groups of repos is having different config files.
Then use the '-c' flag based on what you're working on.

    -c mrconfig
    --config mrconfig
        Use the specified mrconfig file. The default is to use both
        ~/.mrconfig as well as look for a .mrconfig file in the current
        directory, or in one of its parent directories.


On 7 December 2017 at 12:38, Paolo Haji <[hidden email]> wrote:
This is great info!
It's very similar to the part of the rationale for using lerna in RainCatcher, though the main points are the versioning of published npm packages and the symlinking for local development.

I was wondering if there is a way to filter repositories form `mr run`, considering for example you could have registered other, non-apb repos under mr.
It seems this is possible through a skip param that receives a bash command and passes the repository's name via $1.

Looking at more of the documentation of both myrepos and repo it seems they support the notion of sharing the configuration file, so it might be worth looking into having i.e. a small repository/gist with an .mrconfig for the set of apb repos

On Thu, Dec 7, 2017 at 8:10 AM, David Martin <[hidden email]> wrote:
For future handiness,

If you've already run 'mr register' in each of the cloned apb repos (e.g https://github.com/feedhenry/unifiedpush-apb), here's some commands to update the same file in each repo, and create a PR.
In this case, it was updating the apb tools image name.


# Checkout master, update it, then checkout a new branch
mr run git checkout master
mr run git pull origin master
mr run git checkout -b update-apb-tools-image

# Replace the image name in the Makefile
mr run sed -i 's/ansibleplaybookbundle\/apb/ansibleplaybookbundle\/apb-tools/' Makefile

# Add, Commit and push
mr run git add Makefile
mr run git commit -m "Update the apb image to use apb-tools"
mr run git push origin update-apb-tools-image

# Create the pull requests
mr run hub pull-request -b feedhenry:master -m "Update the apb image to use apb-tools"
.....




--
David Martin
Red Hat Mobile
Twitter: @irldavem
IRC: @irldavem (feedhenry, mobile-internal)

_______________________________________________
feedhenry-dev mailing list
[hidden email]
https://www.redhat.com/mailman/listinfo/feedhenry-dev




--

PAOLO HAJI

SOFTWARE ENGINEER, RED HAT MOBILE APPLICATION PLATFORM

Red Hat Brasil

[hidden email]   




--
David Martin
Red Hat Mobile
Twitter: @irldavem
IRC: @irldavem (feedhenry, mobile-internal)

_______________________________________________
feedhenry-dev mailing list
[hidden email]
https://www.redhat.com/mailman/listinfo/feedhenry-dev