#!/bin/bash
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2024 Guillaume Tucker

set -e

push=${1:-no}

tag=$(python3 -c "import renelick; print(f'v{renelick.__version__}')")

echo "Tag: ${tag}"

git tag -a "${tag}" -m "${tag}"

if [ ${push} = 'yes' ]; then
    echo "Pushing tag"
    git push --tags
fi

exit 0
