1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 23:24:09 +00:00

replaced gitpython by git subcommand in workflow

This commit is contained in:
Rene Schallner 2023-05-22 02:46:54 +02:00
parent 2a0f9ebc28
commit 95f3a96184
3 changed files with 18 additions and 8 deletions

View file

@ -21,13 +21,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install discord-webhook GitPython
pip install discord-webhook
- name: Set tag name
id: tag
run: |
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
# we don't build it, we provide it in ./tools
# - uses: goto-bus-stop/setup-zig@v2
# with:
# version: master

View file

@ -1,7 +1,6 @@
import sys
import os
from discord_webhook import DiscordWebhook
from git import Repo
import subprocess
URL = os.getenv("WEBHOOK_URL")
@ -18,9 +17,14 @@ def send_to_discord(message):
def get_tag_annotation(tagname):
repo = Repo('.')
tag = repo.tags[tagname]
return tag.tag.message
ret = subprocess.run([
"git",
"-l",
"--format='%(contents)'",
f"{TAG_NAME}",
], capture_output=True)
text = ret.stdout.decode("utf-8")
return text
def get_replacement():

View file

@ -7,9 +7,14 @@ TAG_NAME = os.getenv("TAG_NAME", sys.argv[1])
def get_tag_annotation(tagname):
repo = Repo('.')
tag = repo.tags[tagname]
return tag.tag.message
ret = subprocess.run([
"git",
"-l",
"--format='%(contents)'",
f"{TAG_NAME}",
], capture_output=True)
text = ret.stdout.decode("utf-8")
return text
def get_replacement():