mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
nightly: fix QR code repo icon generation
This commit is contained in:
parent
c98740a7d2
commit
6f97be128f
1 changed files with 3 additions and 2 deletions
|
|
@ -186,10 +186,10 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
mirror_git_repo.git.add(all=True)
|
mirror_git_repo.git.add(all=True)
|
||||||
mirror_git_repo.index.commit("update README")
|
mirror_git_repo.index.commit("update README")
|
||||||
|
|
||||||
icon_path = os.path.join(repo_basedir, 'icon.png')
|
icon_path = os.path.join(git_mirror_path, 'icon.png')
|
||||||
try:
|
try:
|
||||||
import qrcode
|
import qrcode
|
||||||
img = qrcode.make('Some data here')
|
img = qrcode.make(repo_url)
|
||||||
with open(icon_path, 'wb') as fp:
|
with open(icon_path, 'wb') as fp:
|
||||||
fp.write(img)
|
fp.write(img)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
@ -197,6 +197,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||||
shutil.copy(exampleicon, icon_path)
|
shutil.copy(exampleicon, icon_path)
|
||||||
mirror_git_repo.git.add(all=True)
|
mirror_git_repo.git.add(all=True)
|
||||||
mirror_git_repo.index.commit("update repo/website icon")
|
mirror_git_repo.index.commit("update repo/website icon")
|
||||||
|
shutil.copy(icon_path, repo_basedir)
|
||||||
|
|
||||||
os.chdir(repo_basedir)
|
os.chdir(repo_basedir)
|
||||||
common.local_rsync(options, git_mirror_repodir + '/', 'repo/')
|
common.local_rsync(options, git_mirror_repodir + '/', 'repo/')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue