Skip to content

Commit

Permalink
Slight refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Feb 19, 2025
1 parent 07b387c commit ee9a090
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .ci/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,20 @@ RUN <<EOT
rm -rf /source-tree/.git
if [ -d /sage ]; then
BASE_VERSION=\$(cat /sage/VERSION.txt)
if ! cd /source-tree && .ci/retrofit-worktree.sh worktree-image /sage; then
echo "retrofit-worktree.sh failed, falling back to build from scratch"
if cd /source-tree && .ci/retrofit-worktree.sh worktree-image /sage; then
echo "### Starting incremental build from \$BASE_VERSION"
else
echo "retrofit-worktree.sh failed..."
rm -rf /sage
mv /source-tree /sage
(cd /sage && git init && git add -A && git commit --quiet --allow-empty -m "new")
else
echo "Starting incremental build from \$BASE_VERSION"
echo "### Starting build from scratch"
fi
else
mv /source-tree /sage
git config --global user.name "ci-sage workflow"
git config --global user.email "[email protected]"
(cd /sage && git init && git add -A && git commit --quiet --allow-empty -m "new")
echo "### Starting build from scratch"
fi
EOT
WORKDIR /sage
Expand Down

0 comments on commit ee9a090

Please sign in to comment.