Skip to content

Instantly share code, notes, and snippets.

@friedmud
Created March 3, 2014 18:58
Show Gist options
  • Save friedmud/9332080 to your computer and use it in GitHub Desktop.
Save friedmud/9332080 to your computer and use it in GitHub Desktop.
devel_to_master moosebuild
# Go to where the MOOSE repo was cloned
cd $DEVEL_REPO_DIR
# Make sure there is nothing hanging around
git reset HEAD --hard
# clean it
git clean -xfd
# Check out the devel branch (note, we might already be there, that's ok)
git co devel
# Delete the "test" branch in case it still exists
git branch -D test
# Update the remotes
git fetch origin
# Create a branch to work with (we'll delete this later)
# $sha in this case is the revision of devel we need to test
git co -b test $sha
# Now build and test
cd $DEVEL_REPO_DIR/test
make -j16
./run_tests -c -j16
# Save off the return code from ./run_tests
return_code=$?
# Clean up in the case of bad merge
git reset HEAD --hard
# Go back to the devel branch then delete this one
git co devel
git branch -D test
# Return the return code
exit $return_code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment