Skip to content

Commit

Permalink
Merge pull request #29 from andreas23/master
Browse files Browse the repository at this point in the history
Fix up .gitignore, add commands "merge" and "forall" to everest script
  • Loading branch information
msprotz committed Jul 12, 2017
2 parents 269fbe5 + ed4ee6c commit 464677a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .gitignore
Expand Up @@ -7,3 +7,11 @@ log

test/_build
test/test.native

flexdll/
nuget/
setup.log
setup.log.full
z3-4.5.0-x64-win/
*.zip
.repo
47 changes: 46 additions & 1 deletion everest
Expand Up @@ -572,7 +572,7 @@ declare -a remaining_args

self_update () {
old_revision=$(git rev-parse HEAD)
git pull
git pull --rebase
if [[ $(git rev-parse HEAD) != $old_revision ]]; then
blue "Self-updating to new everest revision $(git rev-parse HEAD | cut -c 1-8)"
# Now, we transfer execution to the new version of $0
Expand Down Expand Up @@ -645,6 +645,32 @@ do_reset ()
done
}

do_merge ()
{
self_update
echo Merging working copies
for r in ${!repositories[@]}; do
echo
blue "Pulling and rebasing $r"
cd $r
git pull --rebase
cd ..
done
}

do_forall ()
{
blue "Executing on toplevel"
"${remaining_args[@]}"
for r in ${!repositories[@]}; do
echo
blue "Executing in $r"
cd $r
${remaining_args[@]}
cd ..
done
}

run_nuget () {
# This function is called in a subshell in a test context (via possibly_log)
# which means that -e is not inherited. Explicit failures here.
Expand Down Expand Up @@ -917,6 +943,11 @@ COMMAND:
pull self-update the everest repository (i.e. the script and
hashes.sh) then run reset
merge pull all projects, merging and rebasing local changes; does NOT
reset to known to be good version, but preserves your changes
forall execute command in all git repository directories
reset pull all projects and move them to the revisions specified by
hashes.sh
Expand Down Expand Up @@ -968,6 +999,20 @@ while true; do
do_pull
;;

merge)
# Save the remaining options (including pull) for calling the
# new version of $0
remaining_args=("$@")
do_merge
;;

forall)
shift
remaining_args=("$@")
do_forall
break
;;

reset)
do_reset
;;
Expand Down

0 comments on commit 464677a

Please sign in to comment.