Just warn about missing NEWS
This commit is contained in:
parent
0926382f69
commit
502239631e
@ -52,12 +52,7 @@ class _DefaultFileList(list):
|
|||||||
self.append('activity/activity.info')
|
self.append('activity/activity.info')
|
||||||
self.append('setup.py')
|
self.append('setup.py')
|
||||||
|
|
||||||
news_file = os.path.join(_get_source_path(), 'NEWS')
|
if os.path.isfile(_get_source_path('NEWS')):
|
||||||
if not os.path.isfile(news_file):
|
|
||||||
f = open('w')
|
|
||||||
f.write('')
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
self.append('NEWS')
|
self.append('NEWS')
|
||||||
|
|
||||||
class _ManifestFileList(list):
|
class _ManifestFileList(list):
|
||||||
@ -92,7 +87,10 @@ def _extract_bundle(source_file, dest_dir):
|
|||||||
outfile.flush()
|
outfile.flush()
|
||||||
outfile.close()
|
outfile.close()
|
||||||
|
|
||||||
def _get_source_path():
|
def _get_source_path(path=None):
|
||||||
|
if path:
|
||||||
|
return os.path.join(os.getcwd(), path)
|
||||||
|
else:
|
||||||
return os.getcwd()
|
return os.getcwd()
|
||||||
|
|
||||||
def _get_bundle_dir():
|
def _get_bundle_dir():
|
||||||
@ -291,10 +289,16 @@ def cmd_release(bundle_name, manifest):
|
|||||||
def cmd_clean():
|
def cmd_clean():
|
||||||
os.path.walk('.', _delete_backups, None)
|
os.path.walk('.', _delete_backups, None)
|
||||||
|
|
||||||
|
def sanity_check():
|
||||||
|
if not os.path.isfile(_get_source_path('NEWS')):
|
||||||
|
print 'WARNING: NEWS file is missing.'
|
||||||
|
|
||||||
def start(bundle_name=None, manifest='MANIFEST'):
|
def start(bundle_name=None, manifest='MANIFEST'):
|
||||||
if not bundle_name:
|
if not bundle_name:
|
||||||
bundle_name = os.path.basename(_get_source_path())
|
bundle_name = os.path.basename(_get_source_path())
|
||||||
|
|
||||||
|
sanity_check()
|
||||||
|
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
cmd_help()
|
cmd_help()
|
||||||
elif sys.argv[1] == 'build':
|
elif sys.argv[1] == 'build':
|
||||||
|
Loading…
Reference in New Issue
Block a user