mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
snpeff: use update_on to get SnpSift version (#190)
This commit is contained in:
parent
dca81d6702
commit
6b680fca96
2 changed files with 7 additions and 18 deletions
|
@ -1,23 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
import requests
|
||||
import fileinput
|
||||
from lilaclib import *
|
||||
|
||||
def get_latest_tag(owner, repo):
|
||||
url = f"https://api.github.com/repos/{owner}/{repo}/tags"
|
||||
response = requests.get(url)
|
||||
response.raise_for_status()
|
||||
tags = response.json()
|
||||
latest_tag = tags[0]["name"].lstrip("v")
|
||||
return latest_tag
|
||||
|
||||
def pre_build():
|
||||
latest_tag = get_latest_tag("pcingola", "SnpSift")
|
||||
for line in edit_file('PKGBUILD'):
|
||||
if line.startswith('_pkgver2='):
|
||||
current_tag = line.split("=")[1].strip()
|
||||
if latest_tag > current_tag:
|
||||
line = f'_pkgver2={latest_tag}'
|
||||
line = f'_pkgver2={_G.newvers[1]}'
|
||||
print(line)
|
||||
|
||||
update_pkgver_and_pkgrel(_G.newver.lstrip('v'))
|
||||
update_pkgver_and_pkgrel(_G.newver)
|
||||
|
|
|
@ -2,8 +2,6 @@ maintainers:
|
|||
- github: kbipinkumar
|
||||
email: kbipinkumar@pm.me
|
||||
build_prefix: extra-x86_64
|
||||
pre_build_script: |
|
||||
run_cmd(['updpkgsums'])
|
||||
post_build_script: |
|
||||
git_pkgbuild_commit()
|
||||
update_aur_repo()
|
||||
|
@ -11,4 +9,8 @@ update_on:
|
|||
- source: github
|
||||
github: pcingola/SnpEff
|
||||
use_max_tag: true
|
||||
prefix: 'v'
|
||||
prefix: v
|
||||
- source: github
|
||||
github: pcingola/SnpSift
|
||||
use_max_tag: true
|
||||
prefix: v
|
||||
|
|
Loading…
Add table
Reference in a new issue