You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ncdns-repro/.travis/check-tbb-tags

25 lines
540 B
Bash

#!/bin/bash
set -eu -o pipefail
shopt -s failglob
FAIL=0
GIT_TAG=$(git submodule status tor-browser-build | awk '{print $3}')
GIT_URL=https://git.torproject.org/builders/tor-browser-build.git
LATEST_TAG=$(git ls-remote --tags "${GIT_URL}" | grep 'tbb' | grep -v '\^{}' | awk '{print $2}' | awk -F"/" '{print $3}' | sort -V | tail --lines=1)
if [ "${GIT_TAG}" != "(${LATEST_TAG})" ]
then
FAIL=1
echo "tor-browser-build: submodule uses ${GIT_TAG}, latest tag is ${LATEST_TAG}"
fi
if [ "${FAIL}" = 1 ]
then
exit 1
fi
exit 0