mirror of https://github.com/friendica/docker
Bugfixing version_greater() method
This commit is contained in:
parent
046099aba3
commit
2afdf08eed
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -52,6 +52,11 @@ jobs:
|
||||||
script:
|
script:
|
||||||
- ./generate-stackbrew-library.sh
|
- ./generate-stackbrew-library.sh
|
||||||
|
|
||||||
|
- <<: *test-scripts
|
||||||
|
env: SCRIPT=test-entrypoint.sh
|
||||||
|
script:
|
||||||
|
- ./.travis/test-entrypoint.sh
|
||||||
|
|
||||||
- stage: test images (amd64)
|
- stage: test images (amd64)
|
||||||
env: VERSION=2019.04 VARIANT=fpm-alpine ARCH=amd64
|
env: VERSION=2019.04 VARIANT=fpm-alpine ARCH=amd64
|
||||||
- env: VERSION=2019.04 VARIANT=fpm ARCH=amd64
|
- env: VERSION=2019.04 VARIANT=fpm ARCH=amd64
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# copy of see .docker-files/entrypoint.sh - testing all versions
|
||||||
|
version_greater() {
|
||||||
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! version_greater "2019.06" "2019.06-rc"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if ! version_greater "2019.06" "2019.04-rc"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if version_greater "2019.06-rc" "2019.06"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if version_greater "2019.04" "2019.06"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if ! version_greater "2019.06" "2019.04"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if ! version_greater "2019.07" "2019.06-rc"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if version_greater "2019.05" "2019.06-rc"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if version_greater "2019.05-dev" "2019.05"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if ! version_greater "2019.05" "2019.05-dev"; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
|
@ -12,7 +12,7 @@ run_as() {
|
||||||
|
|
||||||
# checks if the the first parameter is greater than the second parameter
|
# checks if the the first parameter is greater than the second parameter
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -r -t '-' -k2,2 | sort -t '.' -n -k1,1 -k2,2 -s | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
|
Loading…
Reference in New Issue