2017-06-07 14:01:44 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
cd "${BASH_SOURCE%/*}/.." &&
|
|
|
|
Utilities/GitSetup/setup-user && echo &&
|
|
|
|
Utilities/GitSetup/setup-hooks && echo &&
|
2020-04-02 16:50:43 +00:00
|
|
|
Utilities/GitSetup/setup-lfs && echo &&
|
2017-06-07 14:01:44 +00:00
|
|
|
(Utilities/GitSetup/setup-upstream ||
|
|
|
|
echo 'Failed to setup origin. Run this again to retry.') && echo &&
|
|
|
|
(Utilities/GitSetup/setup-gitlab ||
|
|
|
|
echo 'Failed to setup GitLab. Run this again to retry.') && echo &&
|
|
|
|
Utilities/GitSetup/tips
|
|
|
|
|
|
|
|
|
|
|
|
echo "Setting up useful Git aliases..." &&
|
|
|
|
|
|
|
|
# Rebase master by default
|
|
|
|
git config rebase.stat true
|
|
|
|
git config branch.master.rebase true
|
|
|
|
|
|
|
|
# General aliases that could be global
|
|
|
|
git config alias.pullall '!bash -c "git pull && git submodule update --init"' &&
|
|
|
|
git config alias.prepush 'log --graph --stat origin/master..' &&
|
2018-07-27 17:15:59 +00:00
|
|
|
git config alias.pull-master 'fetch origin master:master' &&
|
2017-06-07 14:01:44 +00:00
|
|
|
|
|
|
|
# Alias to push the current topic branch to GitLab
|
|
|
|
git config alias.gitlab-push '!bash Utilities/GitSetup/git-gitlab-push' &&
|
|
|
|
echo "Set up git gitlab-push" &&
|
|
|
|
git config alias.gitlab-sync '!bash Utilities/GitSetup/git-gitlab-sync' &&
|
|
|
|
echo "Set up git gitlab-sync" &&
|
|
|
|
true
|
2020-04-02 16:51:02 +00:00
|
|
|
|
2023-05-24 23:51:51 +00:00
|
|
|
# shellcheck disable=SC2034
|
2020-04-02 16:51:02 +00:00
|
|
|
SetupForDevelopment=1
|
2023-05-24 23:51:51 +00:00
|
|
|
# shellcheck disable=SC2154
|
|
|
|
git config hooks.SetupForDevelopment "${SetupForDevelopment_VERSION}"
|
2021-06-24 17:26:40 +00:00
|
|
|
|
|
|
|
# Setup VTK-m-specifc LFS config
|
|
|
|
#
|
2023-05-24 23:51:51 +00:00
|
|
|
# Only set lfs.url to the ssh url
|
|
|
|
OriginURL="$(git remote get-url origin)"
|
|
|
|
if [[ "$OriginURL" =~ ^git@gitlab\.kitware\.com:vtk/vtk-m\.git$ ]]
|
2021-06-24 17:26:40 +00:00
|
|
|
then
|
2023-05-24 23:51:51 +00:00
|
|
|
# This setting overrides every remote/url lfs setting
|
2021-07-16 20:18:10 +00:00
|
|
|
git config --local lfs.url "${OriginURL}"
|
2021-06-24 17:26:40 +00:00
|
|
|
|
|
|
|
# Those settings are only available for newer git-lfs releases
|
|
|
|
git config --local remote.lfspushdefault gitlab
|
|
|
|
git config --local remote.lfsdefault origin
|
|
|
|
fi
|