Rename to ROUTEROS_VERSION.

This commit is contained in:
Cedric BAIL 2024-02-03 21:32:13 -07:00
parent 7c5f724e25
commit 9ce84b8a7a
2 changed files with 4 additions and 5 deletions

View file

@ -17,9 +17,9 @@ RUN set -xe \
bridge-utils iptables jq bash python3
# Environments which may be change
ENV ROUTEROS_VERSON="7.1beta6"
ENV ROUTEROS_IMAGE="chr-$ROUTEROS_VERSON.vdi"
ENV ROUTEROS_PATH="https://download.mikrotik.com/routeros/$ROUTEROS_VERSON/$ROUTEROS_IMAGE"
ENV ROUTEROS_VERSION="7.1beta6"
ENV ROUTEROS_IMAGE="chr-${ROUTEROS_VERSION}.vdi"
ENV ROUTEROS_PATH="https://download.mikrotik.com/routeros/${ROUTEROS_VERSION}/${ROUTEROS_IMAGE}"
# Download VDI image from remote site
RUN wget "$ROUTEROS_PATH" -O "/routeros/$ROUTEROS_IMAGE"

View file

@ -36,11 +36,10 @@ getTarballs | while read line; do
if [ "x$(checkTag "$tag")" == "x" ]
then
url="https://download.mikrotik.com/routeros/$tag/chr-$tag.vdi"
if curl --output /dev/null --silent --head --fail "$url"; then
echo ">>> URL exists: $url"
sed -r "s/(ROUTEROS_VERSON=\")(.*)(\")/\1$tag\3/g" -i Dockerfile
sed -r "s/(ROUTEROS_VERSION=\")(.*)(\")/\1$tag\3/g" -i Dockerfile
git commit -m "Release of RouterOS changed to $tag" -a
git push
git tag "$tag"