mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-05 22:04:58 +01:00
18 lines
316 B
Bash
18 lines
316 B
Bash
|
#!/bin/bash
|
||
|
set -eo pipefail
|
||
|
|
||
|
current="$(
|
||
|
git ls-remote --tags https://github.com/nextcloud/server.git \
|
||
|
| awk -F 'refs/tags/' '
|
||
|
$2 ~ /^v?[0-9]/ {
|
||
|
gsub(/^v|\^.*/, "", $2);
|
||
|
print $2;
|
||
|
}
|
||
|
' \
|
||
|
| sort -uV \
|
||
|
| tail -1
|
||
|
)"
|
||
|
|
||
|
set -x
|
||
|
sed -ri 's/^(ENV NEXTCLOUD_VERSION) .*/\1 '"$current"'/;' ./Dockerfile
|