tools: prepare MIT source for public distribution
Ship MIT notices with published outputs and keep runtime credentials, configuration and history out of source archives. Audit working files, staged blobs and reachable history before publication. Refs #19
This commit is contained in:
@@ -7,6 +7,7 @@ import tempfile
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
import xml.etree.ElementTree as ET
|
||||
import zipfile
|
||||
|
||||
import publish
|
||||
|
||||
@@ -28,6 +29,11 @@ class PublishTests(unittest.TestCase):
|
||||
self.assertIsNotNone(version)
|
||||
manifest = json.loads((output / 'streamdeck/de.finalfactory.finaltoken.sdPlugin/manifest.json').read_text(encoding='utf-8'))
|
||||
self.assertEqual(version + '.0', manifest['Version'])
|
||||
license_text = (Path(publish.__file__).resolve().parent.parent / 'LICENSE').read_text(encoding='utf-8')
|
||||
self.assertEqual(license_text, (output / 'LICENSE').read_text(encoding='utf-8'))
|
||||
self.assertEqual(license_text, (output / 'streamdeck/de.finalfactory.finaltoken.sdPlugin/LICENSE').read_text(encoding='utf-8'))
|
||||
with zipfile.ZipFile(output.with_suffix('.zip')) as bundle:
|
||||
self.assertEqual(license_text, bundle.read('LICENSE').decode('utf-8'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user