Skip to content
Snippets Groups Projects
Commit 1e743f3d authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Added upstream remote in setup script

parent 8b318d00
No related branches found
No related tags found
1 merge request!30Added upstream remote in setup script
......@@ -3,14 +3,13 @@
echo "Setting up git aliases..."
if ! which clang-format 2>1 1>/dev/null
then
echo "ADIOS development requires clang-format to be available in your path."
exit 1
echo "Warning: ADIOS uses clang-format to enforce style guidelines but no"
echo " clang-format binary was found in tyour path"
fi
if ! git config alias.clang-format "!scripts/developer/git/git-clang-format"
then
echo "Error adding clang-format alias"
exit 2
fi
exit 0
#!/usr/bin/env bash
echo "Checking github username..."
GHUSER=$(git remote get-url origin | sed 's|.*[:/]\([^/]*\)/adios2.git|\1|')
if [ -z "${GHUSER}" ]
then
echo " Warning: Unable to determine github username. Are you sure you"
echo " cloned your fork?"
exit 1
fi
echo "Using github user ${GHUSER}"
echo "Adding upstream remote..."
if git remote show upstream > /dev/null 2>&1
then
echo " Warning: upstream remote already exists; skipping"
else
git remote add upstream https://github.com/ornladios/adios2.git
fi
git fetch --all -p
echo "Reconfiguring local master branch to use upstream"
git config branch.master.remote upstream
git config branch.master.mergeOptions "--ff-only"
git config merge.log 100
exit 0
......@@ -10,6 +10,9 @@ function test_cmd {
cd "${BASH_SOURCE%/*}/../.."
test_cmd scripts/developer/git/setup-remotes \
"Failed to setup upstream remotes " 2
test_cmd scripts/developer/git/setup-aliases \
"Failed to setup git aliases" 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment