Files
PRD_TU_MP550/git-hook-gdsript.sh
2025-02-28 10:05:13 +03:00

12 lines
602 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
#
# Описание
#
# Генерирует модуль на языке GDScript с информацией для контроля
# версий в системе git. Использовать для проектов GoDot Engine.
GDSCRIPT_FILE="commit.gd"
HEAD="$(git rev-parse --abbrev-ref HEAD) $(git rev-parse --short HEAD) $(git log -1 --format=%cd)"
echo "extends Node" > ${GDSCRIPT_FILE}
echo "# Файл сгенерирован автоматически! Не изменять вручную!" >> ${GDSCRIPT_FILE}
echo "const VCS_HEAD = '${HEAD}'" >> ${GDSCRIPT_FILE}