Fixed publisher publish relative path error
This commit is contained in:
25
src/tests/__init__.py
Normal file
25
src/tests/__init__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
tests
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
:copyright: (c) 2020 sh-edraft.de
|
||||
:license: MIT, see LICENSE for more details.
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'tests'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
||||
__version__ = '2020.12.0.1'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major=2020, minor=12, micro=0.1)
|
42
src/tests/publisher.py
Normal file
42
src/tests/publisher.py
Normal 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()
|
Reference in New Issue
Block a user