mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-18 15:33:08 +02:00
meta: Expand review build target to allow specifying PR reference for libshared
This allows us to conveniently review PRs for libshared using make LIBPR=62 review and taskwarrior PRs that require libshared PRs as well using make PR=2189 LIBPR=63 review
This commit is contained in:
parent
2bd0d8ebd3
commit
7d5c82e3e7
2 changed files with 16 additions and 6 deletions
|
@ -166,8 +166,8 @@ foreach (doc_FILE ${doc_FILES})
|
||||||
endforeach (doc_FILE)
|
endforeach (doc_FILE)
|
||||||
|
|
||||||
add_custom_command(OUTPUT run-review
|
add_custom_command(OUTPUT run-review
|
||||||
COMMAND docker build -q --build-arg PR=$(PR) -t taskwarrior-review:$(PR) - < scripts/review-dockerfile
|
COMMAND docker build -q --build-arg PR=$(PR) --build-arg LIBPR=$(LIBPR) -t taskwarrior-review:$(PR)s$(LIBPR) - < scripts/review-dockerfile
|
||||||
COMMAND docker run --rm --memory 1g --hostname pr-$(PR) -it taskwarrior-review:$(PR) bash || :
|
COMMAND docker run --rm --memory 1g --hostname pr-$(PR)s$(LIBPR) -it taskwarrior-review:$(PR)s$(LIBPR) bash || :
|
||||||
)
|
)
|
||||||
add_custom_target(review DEPENDS run-review)
|
add_custom_target(review DEPENDS run-review)
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,21 @@ RUN cmake -DCMAKE_BUILD_TYPE=debug .
|
||||||
RUN make -j8
|
RUN make -j8
|
||||||
RUN sudo make install
|
RUN sudo make install
|
||||||
|
|
||||||
# Install from the PR's branch
|
# Use specified PR's branch, if provided
|
||||||
ARG PR
|
ARG PR
|
||||||
ADD https://github.com/GothenburgBitFactory/taskwarrior/pull/${PR}.patch .
|
RUN if [[ ! -z $PR ]]; then \
|
||||||
RUN git fetch origin refs/pull/${PR}/head:pr-${PR}
|
git fetch origin refs/pull/${PR}/head:pr-${PR}; \
|
||||||
RUN git checkout pr-${PR}
|
git checkout pr-${PR}; fi
|
||||||
|
|
||||||
|
# Use specified libshared PR's branch, if provided
|
||||||
|
ARG LIBPR
|
||||||
|
WORKDIR /home/warrior/taskwarrior/src/libshared/
|
||||||
|
RUN if [[ ! -z $LIBPR ]]; then \
|
||||||
|
git fetch origin refs/pull/${LIBPR}/head:libpr-${LIBPR}; \
|
||||||
|
git checkout libpr-${LIBPR}; fi
|
||||||
|
|
||||||
|
# Install taskwarrior
|
||||||
|
WORKDIR /home/warrior/taskwarrior/
|
||||||
RUN cmake -DCMAKE_BUILD_TYPE=debug .
|
RUN cmake -DCMAKE_BUILD_TYPE=debug .
|
||||||
RUN make -j8
|
RUN make -j8
|
||||||
RUN sudo make install
|
RUN sudo make install
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue