forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into pytest_replace_doctest
- Loading branch information
Showing
5,526 changed files
with
191,202 additions
and
161,473 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh -x | ||
if [ $# -lt 3 ]; then | ||
echo >&2 "usage: docker-exec-script.sh CONTAINER WORKDIR [VAR=VALUE...] SCRIPT" | ||
exit 1 | ||
fi | ||
CONTAINER=$1 | ||
WORKDIR=$2 | ||
shift 2 | ||
(echo "cd \"$WORKDIR\""; | ||
while [ $# -gt 1 ]; do | ||
echo "export \"$1\"" | ||
shift | ||
done; | ||
cat "$1") | docker exec -i $CONTAINER bash -ex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,32 +12,35 @@ export GIT_AUTHOR_EMAIL="[email protected]" | |
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" | ||
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" | ||
|
||
set -e | ||
|
||
# Set globally for other parts of the workflow | ||
git config --global user.name "$GIT_AUTHOR_NAME" | ||
git config --global user.email "$GIT_AUTHOR_EMAIL" | ||
|
||
set -ex | ||
set -x | ||
|
||
# If actions/checkout downloaded our source tree using the GitHub REST API | ||
# instead of with git (because do not have git installed in our image), | ||
# we first make the source tree a repo. | ||
if [ ! -d .git ]; then git init && git add -A && git commit --quiet -m "new"; fi | ||
if [ ! -d .git ]; then git init; fi | ||
|
||
# Tag this state of the source tree "new". This is what we want to build and test. | ||
# Commit and tag this state of the source tree "new". This is what we want to build and test. | ||
git add -A && git commit --quiet --allow-empty -m "new" | ||
git tag -f new | ||
|
||
# Our container image contains a source tree in $WORKTREE_DIRECTORY with a full build of Sage. | ||
# But $WORKTREE_DIRECTORY is not a git repository. | ||
# We make $WORKTREE_DIRECTORY a worktree whose index is at tag "new". | ||
# We then commit the current sources and set the tag "old". (This keeps all mtimes unchanged.) | ||
# Then we update worktree and index with "git reset --hard new". | ||
# Then we update worktree and index with "git checkout new". | ||
# (This keeps mtimes of unchanged files unchanged and mtimes of changed files newer than unchanged files.) | ||
# Finally we reset the index to "old". (This keeps all mtimes unchanged.) | ||
# The changed files now show up as uncommitted changes. | ||
# The final "git add -N" makes sure that files that were added in "new" do not show | ||
# as untracked files, which would be removed by "git clean -fx". | ||
if [ -L $WORKTREE_NAME ]; then | ||
rm -f $WORKTREE_NAME | ||
fi | ||
git worktree prune --verbose | ||
git worktree add --detach $WORKTREE_NAME | ||
rm -rf $WORKTREE_DIRECTORY/.git && mv $WORKTREE_NAME/.git $WORKTREE_DIRECTORY/ | ||
rm -rf $WORKTREE_NAME && ln -s $WORKTREE_DIRECTORY $WORKTREE_NAME | ||
if [ ! -f $WORKTREE_NAME/.gitignore ]; then cp .gitignore $WORKTREE_NAME/; fi | ||
(cd $WORKTREE_NAME && git add -A && git commit --quiet --allow-empty -m "old" -a && git tag -f old && git reset --hard new && git reset --quiet old && git add -N . && git status) | ||
(cd $WORKTREE_NAME && git add -A && git commit --quiet --allow-empty -m "old" -a && git tag -f old && git checkout -f new && git clean -fd && git status) |
Oops, something went wrong.