Skip to content

Commit a6de5ec

Browse files
committed
Keep cabal.project from git when building the main branch
1 parent 9c664f4 commit a6de5ec

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

alpine/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ ARG pandoc_commit=main
3131
RUN git clone --branch=$pandoc_commit --depth=1 --quiet \
3232
https://github.com/jgm/pandoc /usr/src/pandoc
3333

34-
# Remove the settings that ship with pandoc.
35-
RUN rm -f cabal.project
34+
# Remove the settings that ship with pandoc, unless we're building the main
35+
# branch.
36+
RUN [ "${pandoc_commit}" = "main" ] || rm -f cabal.project
3637

3738
COPY ./alpine/freeze/pandoc-$pandoc_commit.project.freeze \
3839
/usr/src/pandoc/cabal.project.freeze

static/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ ARG pandoc_commit=main
2424
RUN git clone --branch=$pandoc_commit --depth=1 --quiet \
2525
https://github.com/jgm/pandoc /usr/src/pandoc
2626

27-
# Remove the settings that ship with pandoc.
28-
RUN rm -f cabal.project
27+
# Remove the settings that ship with pandoc, unless we're building the main
28+
# branch.
29+
RUN [ "${pandoc_commit}" = "main" ] || rm -f cabal.project
2930

3031
COPY ./static/freeze/pandoc-$pandoc_commit.project.freeze \
3132
/usr/src/pandoc/cabal.project.freeze

ubuntu/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ ARG pandoc_commit=main
3535
RUN git clone --branch=$pandoc_commit --depth=1 --quiet \
3636
https://github.com/jgm/pandoc /usr/src/pandoc
3737

38-
# Remove the settings that ship with pandoc.
39-
RUN rm -f cabal.project
38+
# Remove the settings that ship with pandoc, unless we're building the main
39+
# branch.
40+
RUN [ "${pandoc_commit}" = "main" ] || rm -f cabal.project
4041

4142
COPY ./ubuntu/freeze/pandoc-$pandoc_commit.project.freeze \
4243
/usr/src/pandoc/cabal.project.freeze

0 commit comments

Comments
 (0)