mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: dind image version fixes (#769)
1) use dind docker version instead of installed local docker 2) do not skip pre-release semver handling, eg. 17.12.0-ce
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
set -ex
|
#!/bin/bash
|
||||||
|
set -exo pipefail
|
||||||
|
|
||||||
docker build --build-arg HTTPS_PROXY --build-arg HTTP_PROXY -t fnproject/dind:latest .
|
docker build --build-arg HTTPS_PROXY --build-arg HTTP_PROXY -t fnproject/dind:latest .
|
||||||
|
|
||||||
# Match version with Docker version
|
# Match version with Docker version
|
||||||
version=$(docker run --rm -v "$PWD":/app treeder/bump --extract --input "`docker -v`")
|
docker_info=$(docker run --rm fnproject/dind:latest docker -v 2>/dev/null | grep "^Docker version")
|
||||||
|
version=$(echo $docker_info | cut -d ' ' -f 3 | tr -d ,)
|
||||||
|
|
||||||
echo "Version: $version"
|
echo "Version: $version"
|
||||||
M=$(docker run --rm treeder/bump --format M --input "$version")
|
|
||||||
Mm=$(docker run --rm treeder/bump --format M.m --input "$version")
|
M=$(echo $version | cut -d '.' -f 1)
|
||||||
|
Mm=$(echo $version | cut -d '.' -f 1,2)
|
||||||
|
|
||||||
# Tag these up so that they're available for the local build process,
|
# Tag these up so that they're available for the local build process,
|
||||||
# if necessary
|
# if necessary
|
||||||
|
|||||||
@@ -16,10 +16,13 @@ fi
|
|||||||
# after any related tests have passed.
|
# after any related tests have passed.
|
||||||
|
|
||||||
# Match version with Docker version
|
# Match version with Docker version
|
||||||
version=$(docker run --rm -v "$PWD":/app treeder/bump --extract --input "`docker -v`")
|
docker_info=$(docker run --rm fnproject/dind:latest docker -v 2>/dev/null | grep "^Docker version")
|
||||||
|
version=$(echo $docker_info | cut -d ' ' -f 3 | tr -d ,)
|
||||||
|
|
||||||
echo "Version: $version"
|
echo "Version: $version"
|
||||||
M=$(docker run --rm treeder/bump --format M --input "$version")
|
|
||||||
Mm=$(docker run --rm treeder/bump --format M.m --input "$version")
|
M=$(echo $version | cut -d '.' -f 1)
|
||||||
|
Mm=$(echo $version | cut -d '.' -f 1,2)
|
||||||
|
|
||||||
# Calculate new release version
|
# Calculate new release version
|
||||||
DIND_NEW=$(echo "$DIND_PREV" | perl -pe 's/\d+\.\d+\.\K(\d+)/$1+1/e')
|
DIND_NEW=$(echo "$DIND_PREV" | perl -pe 's/\d+\.\d+\.\K(\d+)/$1+1/e')
|
||||||
|
|||||||
Reference in New Issue
Block a user