diff --git a/Makefile b/Makefile index f8a9060..8020c36 100644 --- a/Makefile +++ b/Makefile @@ -20,11 +20,14 @@ official-tests: build test: hadolint official-tests -update: teamspeaki_version_update test +update: teamspeak_version_update test tag -teamspeaki_version_update: +teamspeak_version_update: docker run --rm -i \ -v "$(CURDIR):$(CURDIR)" \ -w "$(CURDIR)" \ python:3-alpine \ sh -c "pip install -r patcher/requirements.txt && python3 patcher/index.py" + +tag: + bash ./patcher/tag.sh diff --git a/patcher/tag.sh b/patcher/tag.sh new file mode 100644 index 0000000..8b3a5eb --- /dev/null +++ b/patcher/tag.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -euo pipefail + +ver=$(grep -Eo 'TEAMSPEAK_VERSION=([0-9.]+)' Dockerfile | cut -d '=' -f 2) + +[ -n "${ver}" ] || { + echo "No version found" + exit 1 +} + +git commit -m "Teamspeak Server ${ver}" Dockerfile +git tag "${ver}"