docker-builder/openwrt-builder-commit.dockerfile
Martin Kennedy 2b765dc058 openwrt: Handle if ${remote} is a tag ref instead of a branch
E.g., for the makefile target output-source_v21.02.0-rc1 -- you cannot
check it out as source/v21.02.0-rc1, but you can check it out as just
v21.02.0-rc1.
2021-05-09 19:08:20 +00:00

20 lines
434 B
Docker

FROM openwrt-builder
ARG remote="origin"
ARG remoteurl="https://git.laboratoryb.org/hurricos/openwrt-mirror"
ARG commit="master"
RUN cd ${openwrt_dir} \
&& ( git remote add ${remote} ${remoteurl} --tags || true )
RUN cd ${openwrt_dir} \
&& git fetch --all \
&& git checkout ${remote}/${commit} || git checkout "${commit}"
RUN cd ${openwrt_dir} \
&& ./scripts/feeds update -a \
&& ./scripts/feeds install -a