~edwargix/git.sr.ht

75fbc2f1e4cd36f47a9d92eab73c3c654d4f107d — Drew DeVault 7 years ago c693d16
Build when new tags are pushed
1 files changed, 6 insertions(+), 2 deletions(-)

M gitsrht/worker.py
M gitsrht/worker.py => gitsrht/worker.py +6 -2
@@ 8,7 8,7 @@ if not hasattr(db, "session"):
    db.init()

from celery import Celery
from pygit2 import Commit
from pygit2 import Commit, Tag
from srht.oauth import OAuthScope
from buildsrht.manifest import Manifest
import requests


@@ 36,7 36,11 @@ def first_line(text):

def do_post_update(repo, git_repo, ref):
    commit = git_repo.get(ref)
    if not commit or not isinstance(commit, Commit):
    if not commit:
        return
    if isinstance(commit, Tag):
        commit = git_repo.get(commit.target)
    if not isinstance(commit, Commit):
        return

    # builds.sr.ht