Skip to content

Commit

Permalink
Add openmodelica.org mirror pulling by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed May 13, 2015
1 parent 7ea458b commit e48b4da
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Expand Up @@ -33,22 +33,26 @@ $ (cd testsuite/partest && ./runtests.pl -j8)

## Working with the repository

OpenModelica.git is a superproject. Clone the project using:
OpenModelica.git is a superproject. Clone the project using one of:
```bash
git clone https://github.com/OpenModelica/OpenModelica.git --recursive
# Faster pulling by using openmodelica.org read-only mirror (low latency in Europe; very important when updating all submodules)
# Replace the openmodelica.org pull URL with https://github.com/OpenModelica/OpenModelica.git if you want to pull directly from github
# The default choice is to push to your fork on github.com (SSH). Replace MY_FORK with OpenModelica to push directly to the OpenModelica repositories (if you have access)
MY_FORK=MyName ; git clone https://openmodelica.org/git-readonly/OpenModelica.git --recursive && (cd OpenModelica && git remote set-url --push origin git@github.com:$MY_FORK/OpenModelica.git && git submodule foreach --recursive 'git remote set-url --push origin `git config --get remote.origin.url | sed s,^.*/,git@github.com:'$MY_FORK'/,`')
```
To keep the project updated, use something like:
```bash
git pull --recurse-submodules && git submodule foreach --recursive "git submodule update"
# Note: Changes the head to the latest one; your changes might be lost
git pull --recurse-submodules && git submodule update --recursive
```
If you have push access to the submodules, you can push them all together and let [hudson](https://test.openmodelica.org/hudson/) run the tests before this project is updated (only necessary if you change an interface or the test suite at the same time as [OMCompiler](https://github.com/OpenModelica/OMCompiler)):
```bash
git submodule foreach --recursive "git push"
```
If you are a developer and want to track the latest heads, use:
```bash
# To clone
git clone https://github.com/OpenModelica/OpenModelica.git --recursive && (cd OpenModelica && git submodule foreach --recursive "git checkout master")
# To update
# After cloning
git submodule foreach --recursive "git checkout master"
# To update; you will need to merge each submodule, but your changes will remain
git submodule foreach --recursive "git pull"
```

0 comments on commit e48b4da

Please sign in to comment.