From 76d07592ac3c3125f2400b41ebe7c9e1371ad596 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Aug 11 2018 20:28:51 +0000 Subject: building PRs --- diff --git a/Dockerfile.build b/Dockerfile.build index 63e3ec3..a17328e 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,8 +1,6 @@ FROM registry.fedoraproject.org/f28/s2i-core:latest -# I need to install this specific version of nodejs because of -# https://bugzilla.redhat.com/show_bug.cgi?id=1607112 -RUN dnf -y install findutils git nodejs-1:8.11.0-1.fc28.x86_64 @development-tools git libssh2-devel +RUN dnf -y install findutils git nodejs @development-tools git libssh2-devel RUN npm i -g @antora/cli && \ ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl-gnutls.so.4 && \ @@ -13,7 +11,7 @@ RUN git config --global user.email 'docs@fedoraproject.org' RUN git config --global user.name 'Fedora Docs' ENV REPO https://pagure.io/fork/bex/fedora-docs/docs-fp-o -ENV BRANCH antora_playbook +ENV BRANCH master RUN mkdir /docs && chgrp -R 0 /docs && chmod +x /docs && chmod -R g=u /docs WORKDIR /docs diff --git a/s2i/bin/assemble b/s2i/bin/assemble index b1d7c4f..db99e81 100755 --- a/s2i/bin/assemble +++ b/s2i/bin/assemble @@ -11,25 +11,11 @@ for remote in `git branch -r | grep -v master`; do git branch --track ${remote#o git fetch --all git checkout ${BRANCH} -#if [ -v PR ]; then -# echo " -----> Building a PR against the base repo." -# git fetch origin pull/${PR}/head:proposed -# -# git checkout proposed -# git show-ref --head --dereference -# -# # This is a fairly nasty thing to do, but asciibinder always checks out -# # -master- and we don't want to try an auto-merge at this stage, that's for -# # people to do. Resetting the local master to the head of the PR will make -# # asciibinder happy -# -# echo " -----> Resetting master" -# git branch -f master HEAD -# git show-ref --head --dereference -# -#fi - -if [ -f site.yml ]; then - echo " -----> Building the site with Antora" - antora site.yml +if [ -v PR ]; then + echo " -----> Building a PR against the base repo." + git fetch origin pull/${PR}/head:proposed + git checkout proposed fi + +echo " -----> Building the site with Antora" +antora site.yml