Skip to content

Commit

Permalink
.ci/write-dockerfile.sh: Check that 'git worktree' works before using…
Browse files Browse the repository at this point in the history
… retrofit-worktree.sh
  • Loading branch information
Matthias Koeppe committed May 10, 2024
1 parent b2e51c9 commit 76de186
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .ci/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ $ADD .ci /new/.ci
$ADD .upstream.d /new/.upstream.d
RUN if [ -d /sage ]; then \
echo "### Incremental build from \$(cat /sage/VERSION.txt)" && \
if command -v git; then \
if git worktree --help >/dev/null 2>&1; then \
printf '/src\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /sage/.gitignore && \
(cd /new && \
printf '/src\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> .gitignore && \
Expand Down Expand Up @@ -340,7 +340,7 @@ ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
$ADD .gitignore /new/.gitignore
$ADD src /new/src
RUN if command -v git; then \
RUN if git worktree --help >/dev/null 2>&1; then \
cd /new && rm -rf .git && \
./.ci/retrofit-worktree.sh worktree-pre /sage; \
else \
Expand Down

0 comments on commit 76de186

Please sign in to comment.