From 9554ea417845afe8b8adb74d0c1a4e7970d19929 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 29 Mar 2019 14:32:21 +0100 Subject: [PATCH] Add automated commit / tag Signed-off-by: Knut Ahlers --- Makefile | 7 +++++-- patcher/tag.sh | 12 ++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 patcher/tag.sh 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}"