Fixed publisher publish relative path error

This commit is contained in:
2020-11-22 00:10:52 +01:00
parent 96d3ccd8d2
commit b31c0dd23c
4 changed files with 43 additions and 10 deletions

42
src/tests/publisher.py Normal file
View File

@@ -0,0 +1,42 @@
from sh_edraft.source_code.model import Version
from sh_edraft.publish import Publisher
from sh_edraft.publish.model import Template
if __name__ == '__main__':
templates = [
Template(
'../../publish_templates/*_template.txt',
'*',
'',
'',
'2020',
'sh-edraft.de',
'MIT',
', see LICENSE for more details.',
'',
'Sven Heidemann',
Version(2020, 12, 0.1).to_dict()
),
Template(
'../../publish_templates/*_template.txt',
'sh_edraft',
'common python library',
'Library to share common classes and models used at sh-edraft.de',
'2020',
'sh-edraft.de',
'MIT',
', see LICENSE for more details.',
'',
'Sven Heidemann',
Version(2020, 12, 0.1).to_dict()
)
]
publisher = Publisher('../', '../../dist', templates)
publisher.exclude('../tests/')
publisher.include('../../LICENSE')
publisher.include('../../README.md')
publisher.create()
publisher.publish()