SetupForDevelopment.sh 891 Bytes
Newer Older
1 2
#!/usr/bin/env bash

3
cd "${BASH_SOURCE%/*}/.." &&
4 5
Utilities/GitSetup/setup-user && echo &&
Utilities/GitSetup/setup-hooks && echo &&
6
Utilities/Scripts/SetupGitAliases.sh && echo &&
7 8
(Utilities/GitSetup/setup-upstream ||
 echo 'Failed to setup origin.  Run this again to retry.') && echo &&
9 10
(Utilities/GitSetup/setup-gitlab ||
 echo 'Failed to setup GitLab.  Run this again to retry.') && echo &&
11
Utilities/Scripts/SetupExternalData.sh && echo &&
12
Utilities/GitSetup/tips
13

14 15 16
# Rebase master by default
git config rebase.stat true
git config branch.master.rebase true
17

18 19 20 21
# Disable Gerrit hook explicitly so the commit-msg hook will
# not complain even if some gerrit remotes are still configured.
git config hooks.GerritId false

22
# Record the version of this setup so Scripts/pre-commit can check it.
23
SetupForDevelopment_VERSION=2
24
git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}