Update lilac.py

This commit is contained in:
月季花中的星辰 2021-12-08 17:22:33 +00:00 committed by GitHub
parent 2c5417bdee
commit ca2d6daf81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,20 +1,10 @@
#!/usr/bin/env python3
from lilaclib import *
def pre_build():
dt = _G.newver.split(None)
dt = datetime.strptime(dt, '%m %d, %Y').strftime('%Y%m%d')
for line in edit_file('PKGBUILD'):
if line.startswith('pkgver='):
line = f'pkgver={dt}'
print(line)
update_pkgver_and_pkgrel(f'{dt}')
run_cmd(['updpkgsums'])
update_pkgver_and_pkgrel(_G.newver.lstrip('v'))
def post_build():
git_add_files('PKGBUILD')
git_commit()
git_add_files('PKGBUILD')
git_commit()