Fix checkout by git ref

This commit is contained in:
Helge Rausch
2023-01-04 11:55:41 +01:00
parent 853eea468e
commit d3f161d7d9
2 changed files with 8 additions and 3 deletions

View File

@@ -26,10 +26,14 @@ COPY db_migrate.sh /etc/my_init.d/90_db_migrate.sh
# If SNPR_REV changed, re-evaluate from here.
ARG SNPR_REV
RUN git clone --depth=1 https://github.com/openSNP/snpr.git /home/app/snpr
RUN git clone https://github.com/openSNP/snpr /home/app/snpr && \
cd /home/app/snpr && \
git checkout $SNPR_REV && \
git rev-parse HEAD > REVISION && \
rm -rf .git
WORKDIR /home/app/snpr
RUN git rev-parse HEAD > REVISION
RUN rm -rf .git
RUN chown app:app -R /home/app
RUN /usr/local/rvm/bin/rvm install $(cat .ruby-version)

View File

@@ -7,5 +7,6 @@ if [ -z "$snpr_rev" ]; then
snpr_rev=$(git ls-remote https://github.com/opensnp/snpr master | cut -f 1)
fi
echo "Building with git ref: $snpr_rev"
docker-compose build --build-arg SNPR_REV=$snpr_rev rails
docker-compose build sidekiq