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:
parent
2a0f9ebc28
commit
95f3a96184
3 changed files with 18 additions and 8 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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():
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Add table
Reference in a new issue