update.sh 352 Bytes
Newer Older
1 2
#!/bin/bash
set -eo pipefail
pierreozoux's avatar
pierreozoux committed
3

4 5 6 7 8 9 10 11 12
current="$(
	git ls-remote --tags https://github.com/RocketChat/Rocket.Chat.git \
		| awk -F 'refs/tags/' '
			$2 ~ /^v?[0-9]/ {
				gsub(/^v|\^.*/, "", $2);
				print $2;
			}
		' \
		| sort -uV \
13
		| grep -vE -- '-(rc|alpha|beta)' \
14 15
		| tail -1
)"
pierreozoux's avatar
pierreozoux committed
16

17
set -x
18
sed -ri 's/^(ENV RC_VERSION) .*/\1 '"$current"'/;' ./Dockerfile