Skip to content

Commit 06a6dc3

Browse files
committed
Updated support.sh documentation.
1 parent 70e68ab commit 06a6dc3

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

docs/support.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
1-
# synApps.sh
2-
A script that makes it easy to clone (and maintain) the synApps modules from their git repos.
1+
# support.sh
2+
A script that makes it easy to clone (and maintain) the EPICS modules that are required/useful for motor development and testing.
33

44
## Justifcation
55

66
### Need
77

8-
The ([synApps/support](https://github.com/EPICS-synApps/support) dir has historically contained scripts to checkout and update synApps modules from subversion. It has clone scripts for github, but there aren't any scripts to keep the clones up-to-date.
8+
The [assemble_synApps.sh](https://github.com/EPICS-synApps/support/blob/master/assemble_synApps.sh) script is the right tool for deploying a static collection of EPICS modules that are known to work well together.
9+
10+
There is often a need to deploy the master branches of a subset of synApps modules, and minimize the effort required to keep them up-to-date. ``support.sh`` is one tool for accomplishing this.
911

1012
### Location
1113

12-
The script to clone synApps modules shouldn't reside in one of the synApps modules. You should be able to delete the synApps dir and not have to re-download the script.
14+
The script to clone EPICS modules shouldn't reside in one of the EPICS modules. You should be able to delete the support dir and not have to re-download the script.
1315

1416
## Usage
1517
```
16-
$ ./synApps.sh
17-
Usage: synApps.sh <clone|fetch|status|stat|rebase>
18+
$ ./support.sh
19+
Usage: support.sh <clone|fetch|status|stat|rebase|auto-rebase>
1820
```
19-
Note: this script needs to be called from the parent of the synApps directory.
21+
Note: this script needs to be called from the support directory where the EPICS modules reside (or will reside).
2022

2123
### clone
22-
The **clone** argument will create a directory named "synApps" in the current working directory. This directory name is hard-coded at the start of [synApps.sh](synApps.sh) and is easy to change.
24+
The **clone** argument will clone EPICS modules in the current working directory.
2325

24-
The "master" branch of each synApps module's github repo will be checked out into the support directory. If "wget" is on the PATH, the script will also download seq-2.2.3 and allenBradley-2.3.
26+
The ``maste`` branch of each EPICS module's github repo will be cloned into the current working directory. If ``wget`` is on the PATH, the script will also download ``seq-2.2.7``.
2527

2628
### fetch
27-
The **fetch** argument will run "git fetch" in each of the directories of the synApps modules that were cloned from github. This needs to be run before the **status** argument will be useful.
29+
The **fetch** argument will run ``git fetch`` in each of the directories of the EPICS modules that were cloned from github. This needs to be run before the **status** output will be useful.
2830

2931
### status
30-
The **status** argument will run "git status" in each of the directories of the synApps modules that were cloned from github. This will show local modifications to files. If the last fetch retrieved changes from github, status will tell you how far your clone is behind origin.
32+
The **status** argument will run ``git status`` in each of the directories of the EPICS modules that were cloned from github. This will show local modifications to files. If the last fetch retrieved changes from github, status will tell you how far your clone is behind origin (if you're on the master branch).
3133

3234
### stat
33-
The **stat** argument will run "git status" in each of the directories of the synApps modules that were cloned from github, however, it greps the output for fast-forward messages and doesn't show you any of the local modifications to files. Running **stat** after **fetch** will make it easier to see how far from the bleeding edge you are.
35+
The **stat** argument will run ``git status`` in each of the directories of the EPICS modules that were cloned from github, however, it greps the output for fast-forward messages and doesn't show you any of the local modifications to files. Running **stat** after **fetch** will make it easier to see how far from the bleeding edge you are.
3436

3537
### rebase
36-
The **rebase** argument will run "git status" in each of the directories of the synApps modules that were cloned from github and if it sees that a rebase is necessary, it will spawn a new bash shell with a custom prompt so that you can rebase manually.
38+
The **rebase** argument will run ``git status`` in each of the directories of the EPICS modules that were cloned from github and if it sees that a rebase is necessary, it will spawn a new bash shell with a custom prompt so that you can rebase manually.
3739

38-
Manual rebasing is necessary because there will frequently be local changes that break automatic rebasing. "make release" will modify the RELEASE file of almost every synApps module, which requires a "git stash" before rebasing and a "git stash apply" after rebasing. Merge conflicts occur when "git stash apply" reapplies changes to a file that was updated during the rebase.
40+
Manual rebasing is necessary when local changes break automatic rebasing. "make release" will modify the RELEASE file of almost every EPICS module, which requires a "git stash" before rebasing and a "git stash apply" after rebasing. Merge conflicts occur when "git stash apply" reapplies changes to a file that was updated during the rebase.
3941

4042
A typical rebase decision-making process looks like this:
4143
```
@@ -47,7 +49,10 @@ ELSE "git status" shows non-trivial changes
4749
THEN ???
4850
"exit" # once the rebase is complete
4951
```
50-
In the ??? scenario a judgement call needs to be made. The git-stash approach can be used, which may result in merge conflicts. The risk of merge conflicts can be reduced by renaming local-modified files, checking out clean versions, rebasing, then manually copying the locally-modified files back.
52+
In the ``???`` scenario a judgement call needs to be made. The git-stash approach can be used, which may result in merge conflicts. The risk of merge conflicts can be reduced by renaming local-modified files, checking out clean versions, rebasing, then manually copying the locally-modified files back.
53+
54+
### auto-rebase
55+
The **auto-rebase** command will run ``git stash && git rebase origin/master && git stash apply`` in each of the directories fo the EPICS modules that were cloned from github. It should only be used when ``status`` reports only changes that can be fast-fowarded AND the chance of merge conflicts is minimal.
5156

5257
## Supported platforms
5358
* RHEL6

0 commit comments

Comments
 (0)