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
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install discord-webhook GitPython
|
pip install discord-webhook
|
||||||
|
|
||||||
- name: Set tag name
|
- name: Set tag name
|
||||||
id: tag
|
id: tag
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
|
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
|
# - uses: goto-bus-stop/setup-zig@v2
|
||||||
# with:
|
# with:
|
||||||
# version: master
|
# version: master
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
from discord_webhook import DiscordWebhook
|
from discord_webhook import DiscordWebhook
|
||||||
from git import Repo
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
URL = os.getenv("WEBHOOK_URL")
|
URL = os.getenv("WEBHOOK_URL")
|
||||||
|
@ -18,9 +17,14 @@ def send_to_discord(message):
|
||||||
|
|
||||||
|
|
||||||
def get_tag_annotation(tagname):
|
def get_tag_annotation(tagname):
|
||||||
repo = Repo('.')
|
ret = subprocess.run([
|
||||||
tag = repo.tags[tagname]
|
"git",
|
||||||
return tag.tag.message
|
"-l",
|
||||||
|
"--format='%(contents)'",
|
||||||
|
f"{TAG_NAME}",
|
||||||
|
], capture_output=True)
|
||||||
|
text = ret.stdout.decode("utf-8")
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
def get_replacement():
|
def get_replacement():
|
||||||
|
|
|
@ -7,9 +7,14 @@ TAG_NAME = os.getenv("TAG_NAME", sys.argv[1])
|
||||||
|
|
||||||
|
|
||||||
def get_tag_annotation(tagname):
|
def get_tag_annotation(tagname):
|
||||||
repo = Repo('.')
|
ret = subprocess.run([
|
||||||
tag = repo.tags[tagname]
|
"git",
|
||||||
return tag.tag.message
|
"-l",
|
||||||
|
"--format='%(contents)'",
|
||||||
|
f"{TAG_NAME}",
|
||||||
|
], capture_output=True)
|
||||||
|
text = ret.stdout.decode("utf-8")
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
def get_replacement():
|
def get_replacement():
|
||||||
|
|
Loading…
Add table
Reference in a new issue