Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
[ADD] Satellite repository integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dreispt committed Jul 4, 2016
1 parent 6e6daf1 commit bd93c74
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sample_files/oca_modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# List the OCA satellite projects to merge into this repo
# Format <repo identifier> <repo git url> <repo branch>

# Examples
# ========
#
# To integrate the modules in the 'OCA/web' repository, use:
# web
#
# To explicitely give the URL of a fork, and still use the version specified in
# .travis.yml, use:
# web https://github.com/OCA/web.git
#
# To provide both the URL and a branch, use:
# web https://github.com/OCA/web.git branchname
4 changes: 4 additions & 0 deletions tests/test_repo/oca_modules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# List the OCA satellite projects to merge into this repo
# Format <repo identifier> <repo git url> <repo branch>

integrated-repo https://github.com/OCA/maintainer-quality-tools.git test-dependencies
18 changes: 18 additions & 0 deletions travis/clone_oca_dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ def git_clone(checkout_path, reponame, url, branch):
return checkout_path


def git_merge(checkout_path, reponame, url, branch):
if osp.isdir(checkout_path):
run_shell(
['git', 'config', '--global',
'user.email', '[email protected]'])
run_shell(
['git', 'config', '--global',
'user.name', 'OCA Bot'])
run_shell(
['git', '-C', checkout_path, 'fetch', url, branch])
run_shell(
['git', '-C', checkout_path, 'merge', '--no-edit',
'-X', 'ours', 'FETCH_HEAD'])
return checkout_path


def clone_repos(method, deps_path, deps_name, target_path):
"""Recursively install all dependency repositories
Expand Down Expand Up @@ -104,6 +120,8 @@ def install_requirements(parent_path):


def run(deps_checkout_dir, build_dir):
clone_repos(
git_merge, build_dir, 'oca_modules.txt', build_dir)
clone_repos(
git_clone, build_dir, 'oca_dependencies.txt', deps_checkout_dir)
install_requirements(deps_checkout_dir)
Expand Down

0 comments on commit bd93c74

Please sign in to comment.