bump version and retry drone full deply
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
b4dfce2ed9
commit
337abc3db1
3 changed files with 22 additions and 31 deletions
31
.drone.yml
31
.drone.yml
|
@ -33,24 +33,23 @@ steps:
|
|||
password:
|
||||
from_secret: docker_password
|
||||
repo: takaoni/tenkan
|
||||
tags: '1.3'
|
||||
tags: ${'DRONE_COMMIT_SHA':0:8}
|
||||
dockerfile: docker/Dockerfile
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
# - name: deploy_kube
|
||||
# image: takaoni/drone-kube
|
||||
# settings:
|
||||
# template: apps/tenkan.yaml
|
||||
# namespace: gemini
|
||||
# server:
|
||||
# from_secret: kube_server
|
||||
# when:
|
||||
# branch:
|
||||
# - master
|
||||
|
||||
host_aliases:
|
||||
- ip: 192.168.0.210
|
||||
hostnames:
|
||||
- git.fqserv.eu
|
||||
- name: deploy_kube
|
||||
image: sinlead/drone-kubectl
|
||||
settings:
|
||||
kubernetes_server:
|
||||
from_secret: kube_url
|
||||
kubernetes_cert:
|
||||
from_secret: kube_cert
|
||||
kubernetes_token:
|
||||
from_secret: kube_token
|
||||
commands:
|
||||
- kubectl set image deployment/tenkan fqserv=takaoni/tenkan:${'DRONE_COMMIT_SHA':0:8} -n gemini
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
|
2
setup.py
2
setup.py
|
@ -19,7 +19,7 @@ here = os.path.abspath(os.path.dirname(__file__))
|
|||
|
||||
setup(
|
||||
name='tenkan',
|
||||
version='0.1.5',
|
||||
version='0.1.6',
|
||||
description='RSS/atom feed converter from html to gemini',
|
||||
python_requires='==3.*,>=3.8.0',
|
||||
project_urls={'repository': 'https://git.fqserv.eu/takaoni/tenkan'},
|
||||
|
|
|
@ -62,9 +62,7 @@ def delete_folder(path: str, feed_name: str) -> None:
|
|||
shutil.rmtree(f'{path}{feed_name}')
|
||||
logging.info('%s/%s folder deleted', path, feed_name)
|
||||
else:
|
||||
logging.info(
|
||||
'folder %s%s not present, nothing to delete', path, feed_name
|
||||
)
|
||||
logging.info('folder %s%s not present, nothing to delete', path, feed_name)
|
||||
|
||||
|
||||
def index_file_write_header(path: str, title: str) -> None:
|
||||
|
@ -80,9 +78,7 @@ def index_file_write_footer(path: str) -> None:
|
|||
index.write('\n=> atom.xml Atom feed\n')
|
||||
|
||||
|
||||
def write_article(
|
||||
article: dict, data: dict, path: str
|
||||
) -> Dict[str, Union[bool, str]]:
|
||||
def write_article(article: dict, data: dict, path: str) -> Dict[str, Union[bool, str]]:
|
||||
"""Write individual article"""
|
||||
# prepare data for file format
|
||||
date = article['article_date']
|
||||
|
@ -93,9 +89,7 @@ def write_article(
|
|||
|
||||
# we add the entry into index file
|
||||
with open(f'{path}/index.gmi', 'a') as index:
|
||||
index.write(
|
||||
f"=> {file_date}_{file_title}.gmi {date} - {article['article_title']}\n"
|
||||
)
|
||||
index.write(f"=> {file_date}_{file_title}.gmi {date} - {article['article_title']}\n")
|
||||
|
||||
new_file = False
|
||||
# write the file is it doesn't exist, obviously
|
||||
|
@ -105,9 +99,7 @@ def write_article(
|
|||
# we write the entry file
|
||||
author = article['author'] if 'author' in article else None
|
||||
|
||||
pathlib.Path(f'{path}/{file_date}_{file_title}.gmi').write_text(
|
||||
f"# {article['article_title']}\n\n=> {article['http_url']}\n\n{date}, {author}\n\n{content}"
|
||||
)
|
||||
pathlib.Path(f'{path}/{file_date}_{file_title}.gmi').write_text(f"# {article['article_title']}\n\n=> {article['http_url']}\n\n{date}, {author}\n\n{content}")
|
||||
url = f"{data['gmi_url']}{data['title']}/{file_date}_{file_title}.gmi"
|
||||
return {'new_file': new_file, 'url': url}
|
||||
|
||||
|
@ -123,9 +115,9 @@ def _rebuild_atom_file(path: str, data: dict, urls: list) -> None:
|
|||
atomfeed.link(href=data['gmi_url'], rel='alternate')
|
||||
|
||||
# rebuild all articles
|
||||
for article in enumerate(data['articles']):
|
||||
for art, article in enumerate(data['articles']):
|
||||
atomentry = atomfeed.add_entry()
|
||||
url = urls[0]
|
||||
url = urls[art]
|
||||
atomentry.guid(url)
|
||||
atomentry.link(href=url, rel='alternate')
|
||||
atomentry.updated(article['updated'])
|
||||
|
|
Loading…
Reference in a new issue